Sign in to follow this  
Followers 0
WhyTea

Disable ComboBox editing

4 posts in this topic

Is it possible to disable editing in a ComboBox while still allowing selection from the dropdown list? I.E. I would like the items in the ComboBox to be static.

/Why Tea

Share this post


Link to post
Share on other sites



Share this post


Link to post
Share on other sites

Yes!! The editing is the default style, so to change it just set the style to: $CBS_DROPDOWNLIST (requires #include<ComboConstants.au3>), or 0x0003.

#include<ComboConstants.au3>

$hGUI = GUICreate ("Testing combo box")
GUICtrlCreateCombo ("", 2, 2, 100, 20, $CBS_DROPDOWNLIST)
GUICtrlSetData (-1, "Item 1|Item 2|Item 3", "Item 1")
GUISetState ()
While GUIGetMsg () <> -3
WEnd

Mat

1 person likes this

Share this post


Link to post
Share on other sites

Thanks. Got it to work now.

/Why Tea

Share this post


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
Sign in to follow this  
Followers 0