Can I have my listbox default to all selected

1 view (last 30 days)
Currently I start with a listbox disabled. When enabled, I would like to have all selections highlighted by default. Is this possible?
  1 Comment
Jan
Jan on 23 May 2018
It depends. What are "all selections" and how do you "enable" it?

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 23 May 2018
Try this (if using GUIDE)
itemsInListBox = handles.listbox1.String;
handles.listbox1.Value = 1 : length(itemsInListBox);

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Tags

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!