Roswellr Posted April 22, 2007 Share Posted April 22, 2007 There is a control or property for the combo box that makes the combo list read-only. Where by the user can only select items in the combo box as a list. You cannot edit the combo box and the items in the drop down list appear as a list item would appear. Can anyone give some examples? Link to comment Share on other sites More sharing options...
martin Posted April 22, 2007 Share Posted April 22, 2007 There is a control or property for the combo box that makes the combo list read-only. Where by the user can only select items in the combo box as a list. You cannot edit the combo box and the items in the drop down list appear as a list item would appear. Can anyone give some examples? Try this #include <GuiCombo.au3> #include <GUIConstants.au3> $cbex = GUICreate("can't edit the combobox",300,200) $Combo = GUICtrlCreateCombo("", 18, 100, 200, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL,$CBS_SORT)) GUISetState(@SW_SHOW) GUICtrlSendMsg($Combo ,$EM_SETREADONLY,false, 0) for $n = 1 to 10 GUICtrlSetData($Combo,'item ' & $n) Next GUICtrlSetData($Combo,'item 1') while 1 $m = GUIGetMsg() if $m = $GUI_EVENT_CLOSE then ExitLoop WEnd Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
xcal Posted April 22, 2007 Share Posted April 22, 2007 Try this Why GUICtrlSendMsg($Combo ,$EM_SETREADONLY,false, 0) and #include <GuiCombo.au3> ? #include <GUIConstants.au3> GUICreate('', 120, 40) GUICtrlCreateCombo('', 10, 10, 100, 200, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $WS_VSCROLL)) For $i = 1 To 50 GUICtrlSetData(-1, 'Entry ' & $i) Next GUICtrlSetData(-1, 'Entry 1') GUISetState() While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit WEnd Professor_Bernd 1 How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
Sokko Posted April 22, 2007 Share Posted April 22, 2007 Yep, the CBS_DROPDOWNLIST style is all it takes. The default style is CBS_DROPDOWN (minus the LIST), which makes the dropdown editable. Link to comment Share on other sites More sharing options...
martin Posted April 22, 2007 Share Posted April 22, 2007 Why GUICtrlSendMsg($Combo ,$EM_SETREADONLY,false, 0) and #include <GuiCombo.au3> ?@xcal: Yes you're right. I didn't need those lines so they should have been removed. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Roswellr Posted April 23, 2007 Author Share Posted April 23, 2007 Much thanks! I been trying $CBS_DROPDOWN and the $CBS_DROPDOWNLIST description didn't seem like the one i was after but it was thanks! 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