Rad Posted August 19, 2006 Share Posted August 19, 2006 I checked the styles and its not there, you would think this would be important wouldnt you? In this case it lists all the open, visible, active windows and an option "Any"... Rather than make it change back to the text field (where your supposed to type) I keep it there so that you can scroll with your mouse button. But if I werent a mouse-scroller type of person I would click it... but then if I type again it erases it and starts typing a new one. I DONT WANT THIS! How can I lock the box while keeping it able to change by the user? Link to comment Share on other sites More sharing options...
Rad Posted August 19, 2006 Author Share Posted August 19, 2006 Case $tempcombo <> GUICtrlRead($Combo) $temp = 1 For $i = 0 to UBound($Previews)-1 If GUICtrlRead($Combo) = $Previews[$i] Then $Temp = 0 Next If GUICtrlRead($Combo) = "Any" Then $Temp = 0 If $temp = 1 Then GUICtrlSetData($Combo,$tempcombo) $Temp = 0 Endif $tempcombo = GUICtrlRead($Combo) That seems to work, whenever you change it, it changes back to what it was... unless its one of the Previews or "any" works perfectly But I still think there should be a style for this... Link to comment Share on other sites More sharing options...
Helge Posted August 19, 2006 Share Posted August 19, 2006 Using the style $CBS_DROPDOWNLIST for your combo might be a little bit easier :#include <GUIConstants.au3> GUICreate("My GUI combo") ; will create a dialog box that when displayed is centered GUICtrlCreateCombo ("item1", 10,10, 200, 100, $CBS_DROPDOWNLIST) ; create first item GUICtrlSetData(-1,"item2|item3","item3") ; add other item snd set a new default GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend 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