Rater Posted February 23, 2008 Share Posted February 23, 2008 Cannot find any info on this: When my script creates a GUI with a combo box, the default text visible in the combo box arrives "activated" (i.e. highlighted blue). I want to change this so that when the GUI arrives, the combo box text is NOT highlighted blue (or any other color). Possible ??? Link to comment Share on other sites More sharing options...
martin Posted February 23, 2008 Share Posted February 23, 2008 (edited) Cannot find any info on this: When my script creates a GUI with a combo box, the default text visible in the combo box arrives "activated" (i.e. highlighted blue). I want to change this so that when the GUI arrives, the combo box text is NOT highlighted blue (or any other color). Possible ??? Just move the focus to something else. Here is the example from help with a label added which is just to do what you want (I think). #include <GUIConstants.au3> 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 $l = GUICtrlCreateLabel("",0,0,1,1) GUISetState () GUICtrlSetState($l,$GUI_FOCUS);set focus to the 'invisible' label ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Edited February 23, 2008 by martin 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...
Rater Posted February 23, 2008 Author Share Posted February 23, 2008 Just move the focus to something else. Here is the example from help with a label added which is just to do what you want (I think). #include <GUIConstants.au3> 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 $l = GUICtrlCreateLabel("",0,0,1,1) GUISetState () GUICtrlSetState($l,$GUI_FOCUS);set focus to the 'invisible' label ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Thank you, Martin. Very good idea. 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