midiaxe Posted October 20, 2004 Share 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 Link to comment Share on other sites More sharing options...
SlimShady Posted October 20, 2004 Share 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. Link to comment Share on other sites More sharing options...
midiaxe Posted October 20, 2004 Author Share 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 Link to comment Share on other sites More sharing options...
Valik Posted October 20, 2004 Share Posted October 20, 2004 Of course it is. You're passing the style parameter as the height of the control. Link to comment Share on other sites More sharing options...
Josbe Posted October 20, 2004 Share 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 Link to comment Share on other sites More sharing options...
midiaxe Posted October 20, 2004 Author Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now