Brakefield Posted May 23, 2008 Posted May 23, 2008 Hey guys and girls, a quick question for you all:Is there a way to disable the combo-box from being edited?I tried applying a few different styles -- $ES_READONLY was in particular fitting the description of what I want to do, but that only messed up the combo-box all together, as that particular style is part of the Input/Edit fields.Here's an example right out of the help menu -- if you give it a try, you'll see that that you can type right into the combo box, an undesired nor aesthetically pleasing "feature":#include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) Example() Func Example() Local $msg GUICreate("My GUI combo") ; will create a dialog box that when displayed is centered GUICtrlCreateCombo("item1", 10, 10); 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 EndFunc ;==>ExampleAny help is greatly appreciated.example.au3
sandin Posted May 23, 2008 Posted May 23, 2008 did you mean something like this: #include <GUIConstantsEx.au3> #include <ComboConstants.au3> Opt('MustDeclareVars', 1) Example() Func Example() Local $msg GUICreate("My GUI combo") ; will create a dialog box that when displayed is centered GUICtrlCreateCombo("item1", 10, 10, -1, -1, $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 EndFunc ;==>Example? Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
enaiman Posted May 23, 2008 Posted May 23, 2008 Use: $CBS_DROPDOWNLIST for ComboBox's style GUICtrlCreateCombo("item1", 10, 10, 50, 17,BitOR($CBS_DROPDOWNLIST, $WS_VSCROLL) ) Synapsee 1 SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
Brakefield Posted May 23, 2008 Author Posted May 23, 2008 Beautiful thanks - exactly what I was looking for.
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