midiaxe 0 Posted October 20, 2004 (edited) Hello everybody, I have a GUI and I need to create a combo box with the edit disable. I looked at the GUI doc and did not find any style definition for this. Am I missing something? Appreciate the help! Thanks, =MX= Edited October 20, 2004 by midiaxe Share this post Link to post Share on other sites
SlimShady 1 Posted October 20, 2004 It is in the help file.CBS_DROPDOWNLIST 0x0003 Displays a static text field that displays the current selection in the list box. Share this post Link to post Share on other sites
midiaxe 0 Posted October 20, 2004 I tried the following code below and it seems that the listbox is still editable. I'm using the latest unstable version: Thanks! #include <GUIConstants.au3> $wndMain = GUICreate("My GUI") $cboBuildFile = GUICtrlCreateCombo("item1", 10, 10, 200, $CBS_DROPDOWNLIST) GUICtrlSetData($cboBuildFile,"item2|item3","item3") GuiSetState(@SW_SHOW) ;------------------------------- ; Just idle around While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Share this post Link to post Share on other sites
Valik 478 Posted October 20, 2004 Of course it is. You're passing the style parameter as the height of the control. Share this post Link to post Share on other sites
Josbe 1 Posted October 20, 2004 Or 'Read-Only' you said? Here a small example: Global $CBS_DROPDOWNLIST= 3 Global $ES_READONLY= 2048 Global $LBS_STANDARD= 10485763 $GUI_EVENT_CLOSE= -3 GUICreate("test", 200, 100) $combo=GUICtrlCreateCombo("", 10, 10, 100, 80, BitOR($ES_READONLY, $CBS_DROPDOWNLIST, $LBS_STANDARD)) GUICtrlSetData($combo,"item1|item2|item3", "item1") GUISetState() While 1 $msg= GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit Wend Exit AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Share this post Link to post Share on other sites
midiaxe 0 Posted October 20, 2004 (edited) Blame my fat finger I guess . Thanks Valik for spotting that error. Josbe, thanks for code, it really helped me. I've been debugging my code since last night and can't figure it out until I saw your code. I didnt know that you can use some style definitions from a control to another control (in this case an edit style, to a combo style). Thanks, -MX- Edited October 20, 2004 by midiaxe Share this post Link to post Share on other sites