Select more than one item in a listbox
-
I have a dialog based app with three listboxes. I used AddString("") to add several items to each string. When I run the program, it allows me to select all the items at one time. I want the user to only be able to select one item at a time. How do I do this? Thanks, Stephanie
-
I have a dialog based app with three listboxes. I used AddString("") to add several items to each string. When I run the program, it allows me to select all the items at one time. I want the user to only be able to select one item at a time. How do I do this? Thanks, Stephanie
Hi, If you create list boxes explicitely using create function then make sure that you didn't specify LBS_EXTENDEDSEL or LBS_MULTIPLESEL style. If you use dialog editor for creating the template for your dialog then you have to display a property dialog for the list box control. On this dialog you have to select the second page "Styles" and in the "Selection" combo box you have to choose "Single" item Regards, Andrei Zenkovitch Dundas Software ================== The original message was: I have a dialog based app with three listboxes. I used AddString("") to add several items to
each string. When I run the program, it allows me to select all the items at one time. I
want the user to only be able to select one item at a time. How do I do this?Thanks,
Stephanie -
Hi, If you create list boxes explicitely using create function then make sure that you didn't specify LBS_EXTENDEDSEL or LBS_MULTIPLESEL style. If you use dialog editor for creating the template for your dialog then you have to display a property dialog for the list box control. On this dialog you have to select the second page "Styles" and in the "Selection" combo box you have to choose "Single" item Regards, Andrei Zenkovitch Dundas Software ================== The original message was: I have a dialog based app with three listboxes. I used AddString("") to add several items to
each string. When I run the program, it allows me to select all the items at one time. I
want the user to only be able to select one item at a time. How do I do this?Thanks,
StephanieI had "Single" selected. It makes the list box gray (instead of white) and won't unselect item. ie. The default selection is String1. If you click on String2, both are blue. If you click again on String1, it stays blue. It's impossible to select only one string, unless you take the default. I'm not sure what's going on. Stephanie ================== The original message was: Hi,
If you create list boxes explicitely using create function then make sure that you didn't specify LBS_EXTENDEDSEL or LBS_MULTIPLESEL style.
If you use dialog editor for creating the template for your dialog then you have to display a property dialog for the list box control. On this dialog you have to select the second page "Styles" and in the "Selection" combo box you have to choose "Single" itemRegards,
Andrei Zenkovitch
Dundas Software
==================
The original message was:I have a dialog based app with three listboxes. I used AddString("") to add several items to
each string. When I run the program, it allows me to select all the items at one time. I
want the user to only be able to select one item at a time. How do I do this?Thanks,
Stephanie -
I had "Single" selected. It makes the list box gray (instead of white) and won't unselect item. ie. The default selection is String1. If you click on String2, both are blue. If you click again on String1, it stays blue. It's impossible to select only one string, unless you take the default. I'm not sure what's going on. Stephanie ================== The original message was: Hi,
If you create list boxes explicitely using create function then make sure that you didn't specify LBS_EXTENDEDSEL or LBS_MULTIPLESEL style.
If you use dialog editor for creating the template for your dialog then you have to display a property dialog for the list box control. On this dialog you have to select the second page "Styles" and in the "Selection" combo box you have to choose "Single" itemRegards,
Andrei Zenkovitch
Dundas Software
==================
The original message was:I have a dialog based app with three listboxes. I used AddString("") to add several items to
each string. When I run the program, it allows me to select all the items at one time. I
want the user to only be able to select one item at a time. How do I do this?Thanks,
StephanieI just figured out what it was. In an earlier version of the dialog box, I was changing the color. I don't need that anymore, and when I took out the code, it started working as it should. Thanks for your help! Stephanie ================== The original message was: I had "Single" selected. It makes the list box gray (instead of white) and won't unselect
item. ie. The default selection is String1. If you click on String2, both are blue. If you
click again on String1, it stays blue. It's impossible to select only one string, unless you
take the default. I'm not sure what's going on.Stephanie
==================
The original message was:Hi,
If you create list boxes explicitely using create function then make sure that you didn't specify LBS_EXTENDEDSEL or LBS_MULTIPLESEL style.
If you use dialog editor for creating the template for your dialog then you have to display a property dialog for the list box control. On this dialog you have to select the second page "Styles" and in the "Selection" combo box you have to choose "Single" itemRegards,
Andrei Zenkovitch
Dundas Software
==================
The original message was:I have a dialog based app with three listboxes. I used AddString("") to add several items to
each string. When I run the program, it allows me to select all the items at one time. I
want the user to only be able to select one item at a time. How do I do this?Thanks,
Stephanie