BeckerJMB Posted June 3, 2012 Share Posted June 3, 2012 (edited) Hello All, I am creating a GUI in which there is a multiple choice enabled list. The list in question has about 20 items. I would like to assign 3 or 4 of these items as the Default items so that when a user is looking at the GUI, these items are selected by default. I tried to use the GUICtrlSetData function but it does not seem to apply the defaults I've defined. Local $List1 = GUICtrlCreateList("", 151, 349, 145, 58, BitOR($LBS_MULTIPLESEL,$WS_VSCROLL,$WS_BORDER)) GUICtrlSetData($List1, "CBC: WBC - 9.4|CBC: WBC - 12.1|CBC: WBC - 14.5|CBC: WBC - 16.6|BMP: Normal|BMP: High Glucose|UA: UTI Normal|UA: UTI Abnormal|UA: UTI Critical|UC: Normal|UC: Critical", "CBC: WBC - 16.6|BMP: Normal" ) When I run this script, the $List1 does not have any defaults defined. Even if I only define a single default, instead of multiple defaults as the example above attempts to do. This single default functionality works when I use it in a GUICtrlCreateCombo. I looked at the help file for GUICtrlSet Data and GUICtrlCreateList but I am still unsure how to proceed. Any help would be appreciated. - Jeff Edited June 3, 2012 by BeckerJMB Link to comment Share on other sites More sharing options...
Zedna Posted June 3, 2012 Share Posted June 3, 2012 Look at _GUICtrlListBox_SetSel() Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
BeckerJMB Posted June 4, 2012 Author Share Posted June 4, 2012 That did it, 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