Jump to content

Assign mulitple "default" items in List

Recommended Posts

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 by BeckerJMB
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...