Jump to content

Recommended Posts

I was trying to set-up a combo where user can only select from list items but when use $CBS_DROPDOWNLIST I loose the scrolldown bar so user can only pick from visible part of LIST.

User can still use arrow UP and Down to see the other parts of LIST but would be nice to have a scroll bar.

Anyone has any ideas?

Thank you.

Link to post
Share on other sites

Here is the test code. Is there any mistakes?

#include <GuiConstants.au3>

GuiCreate("Test Read-Only Combo", 200, 200,(@DesktopWidth-200)/2, (@DesktopHeight-200)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$Combo = GuiCtrlCreateCombo("Select Item", 20, 20, 160, 200, $CBS_DROPDOWNLIST )

$s_Combo = ""

For $i = 1 To 20

$s_Combo = $s_combo & "Item" & $i & "|"

Next

GUICtrlSetData($Combo, $s_Combo)

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

  ExitLoop

Case Else

  ;;;

EndSelect

WEnd

Link to post
Share on other sites

Here is the test code. Is there any mistakes?

<{POST_SNAPBACK}>

#include <GuiConstants.au3>

GuiCreate("Test Read-Only Combo", 200, 200,(@DesktopWidth-200)/2, (@DesktopHeight-200)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$Combo = GuiCtrlCreateCombo("Select Item", 20, 20, 160, 50, $CBS_DROPDOWNLIST + $WS_VSCROLL )
$s_Combo = ""
For $i = 1 To 120
$s_Combo = $s_combo & "Item" & $i & "|"
Next
GUICtrlSetData($Combo, $s_Combo)

GuiSetState()
While 1
$msg = GuiGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
  ExitLoop
Case Else
 ;;;
EndSelect
WEnd

Is this what u want?

HardCopy

Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...