new2this Posted February 28, 2008 Share Posted February 28, 2008 I have a gui that populates several combo boxes within it. How do I go about limiting the user to selecting only from the drop down items, not allowing them to type in their own input? Thanks ahead of time! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 28, 2008 Moderators Share Posted February 28, 2008 Style: $CBS_DROPDOWN Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
new2this Posted February 28, 2008 Author Share Posted February 28, 2008 So, simply...$cmbCreate = GuiCtrlCreateCombo("",350, 160, 141, 25, $CBS_DROPDOWN) THis should keep the end user from being able to enter their own text in the combo box? If thats the case, then I've done something else wrong. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 28, 2008 Moderators Share Posted February 28, 2008 So, simply...$cmbCreate = GuiCtrlCreateCombo("",350, 160, 141, 25, $CBS_DROPDOWN) THis should keep the end user from being able to enter their own text in the combo box? If thats the case, then I've done something else wrong.Sorry... #include <GUIConstantsEx.au3> GUICreate("") GUICtrlCreateCombo ("", 10,10, -1, -1, $CBS_DROPDOWNLIST) GUICtrlSetData(-1,"1|2|3") GUISetState () While GUIGetMsg() <> -3 WEnd Exit Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
new2this Posted February 29, 2008 Author Share Posted February 29, 2008 Wonderful! Adding the $CBS_DROPDOWNLIST instead of the $CBS_DROPDOWN did the trick. Thanks for your help, SmOke_N!! 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