Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to design multiselectable lists

Subject: How to design multiselectable lists

From: No Spam

Date: 4 Sep, 2008 08:59:02

Message: 1 of 5

Hi,

I have several list in which the user has to choose one or
more items.

It's done with popupmenues by now, which fits great into the
GUI, but doesnt allow for multiple selected items.

I know multiselect can be done by listboxes, but these take
up a lot of space. I would have to make the listboxes adapt
in size to the number of contained items (if possible) to
save some space.

I would really like to here some comments on this matter.
It's rather a design question than a technical problem.
Although a solution on how to enable multiselect on
popupmenues would be ideal.

Thanks in advance...

Subject: How to design multiselectable lists

From: heiko_marx@hotmail.com

Date: 4 Sep, 2008 12:14:09

Message: 2 of 5

On 4 Sep., 10:59, "No Spam" <n...@sogetthis.com> wrote:
> Hi,
>
> I have several list in which the user has to choose one or
> more items.
>
> It's done with popupmenues by now, which fits great into the
> GUI, but doesnt allow for multiple selected items.
>
> I know multiselect can be done by listboxes, but these take
> up a lot of space. I would have to make the listboxes adapt
> in size to the number of contained items (if possible) to
> save some space.
>
> I would really like to here some comments on this matter.
> It's rather a design question than a technical problem.
> Although a solution on how to enable multiselect on
> popupmenues would be ideal.
>
> Thanks in advance...

Hi.

I wonder how multi-selectable popupmenus would be used. If you need to
select more than one item, you need to display many items to have a
good overview when selecting. But if a popupmenu is clicked on, it
closes. You would either have to have a separate OK button to press
when finished, or the multi selection would be limited to adjacent
lines selection.
The first case includes three steps: popup the list, make the
selection, push ok. This can also be achieved by a separate window
popping up when choosing to select something, maybe even with MatLabs
listdialog.
Another idea would be, as you said, to use a listbox with small
dimensions. Maybe with only three lines, so that the selection status
for adjacent entries is visible.

What else?
Heiko

Subject: How to design multiselectable lists

From: No Spam

Date: 4 Sep, 2008 12:30:05

Message: 3 of 5

heiko_marx@hotmail.com wrote in message
<5eeb36ef-710a-4c8b-b25e-2b49631e11e9@x16g2000prn.googlegroups.com>...


> I wonder how multi-selectable popupmenus would be used.

Well, not that I think this would be feasible in Matlab, but:

- click on the first line or dropdwon button to open the popup
- ctrl-click at an entry -> entry gets selected, but menue
does not close (opposed to normal-click, which selects the
one entry and closes the menue immediately)
- ctrl-click on other entrys
- to close, click on the first line, dropdown-button or any
other UI element except the list entrys.
- closed menue shows one (first?) selected entry and '...'
to show that multiple lines are selected

I probably will do a mixed variant. Using dynamically
populated dropdown menues for my items and an add button to
collect them in a listbox. This involves more clicks to get
a 'collection' of items, but it's the only way I can think
of at the moment.

Subject: How to design multiselectable lists

From: David

Date: 4 Sep, 2008 12:58:01

Message: 4 of 5

"No Spam" <news@sogetthis.com> wrote in message <g9okcd$831
$1@fred.mathworks.com>...
> heiko_marx@hotmail.com wrote in message
> <5eeb36ef-710a-4c8b-b25e-
2b49631e11e9@x16g2000prn.googlegroups.com>...
>
>
> > I wonder how multi-selectable popupmenus would be
used.
>
> Well, not that I think this would be feasible in Matlab,
but:
>
> - click on the first line or dropdwon button to open the
popup
> - ctrl-click at an entry -> entry gets selected, but
menue
> does not close (opposed to normal-click, which selects
the
> one entry and closes the menue immediately)
> - ctrl-click on other entrys
> - to close, click on the first line, dropdown-button or
any
> other UI element except the list entrys.
> - closed menue shows one (first?) selected entry
and '...'
> to show that multiple lines are selected
>
> I probably will do a mixed variant. Using dynamically
> populated dropdown menues for my items and an add button
to
> collect them in a listbox. This involves more clicks to
get
> a 'collection' of items, but it's the only way I can
think
> of at the moment.

you might be able to use a multi-select listbox and
dynamically resize it based on mouse over events or
something funky like that... when the mouse moves over it
make it bigger, when the mouse moves out shrink it back to
normal? just an idea, haven't actually tried this one but
would be interested in what you come up with.

Subject: How to design multiselectable lists

From: heiko_marx@hotmail.com

Date: 5 Sep, 2008 05:51:14

Message: 5 of 5

On 4 Sep., 14:58, "David " <d...@bigcompany.com> wrote:
> "No Spam" <n...@sogetthis.com> wrote in message <g9okcd$831
>
> $...@fred.mathworks.com>...> heiko_m...@hotmail.com wrote in message
> > <5eeb36ef-710a-4c8b-b25e-
>
> 2b49631e1...@x16g2000prn.googlegroups.com>...
>
>
>
>
>
> > > I wonder how multi-selectable popupmenus would be
> used.
>
> > Well, not that I think this would be feasible in Matlab,
> but:
>
> > - click on the first line or dropdwon button to open the
> popup
> > - ctrl-click at an entry -> entry gets selected, but
> menue
> > does not close (opposed to normal-click, which selects
> the
> > one entry and closes the menue immediately)
> > - ctrl-click on other entrys
> > - to close, click on the first line, dropdown-button or
> any
> > other UI element except the list entrys.
> > - closed menue shows one (first?) selected entry
> and '...'
> > to show that multiple lines are selected
>
> > I probably will do a mixed variant. Using dynamically
> > populated dropdown menues for my items and an add button
> to
> > collect them in a listbox. This involves more clicks to
> get
> > a 'collection' of items, but it's the only way I can
> think
> > of at the moment.
>
> you might be able to use a multi-select listbox and
> dynamically resize it based on mouse over events or
> something funky like that... when the mouse moves over it
> make it bigger, when the mouse moves out shrink it back to
> normal? =A0just an idea, haven't actually tried this one but
> would be interested in what you come up with.

Hi again.

The difference between a popup menu and a dynamically growing list box
is the behaviour when located near the figure's edge. The popup menu
will be displayed above the figure's edge, but the listbox would be
cut at the edge, probably showing not all of its content.

MatLab's flexibility to do such thing is not enough. I suggest looking
for Java controls that will do what you want. I use Java controls in
my GUIs for a long time now. In Java, if not existing yet, it is also
possible to code something yourself. This way you could, for instance,
extend the functionality of a popup so that ctrl+click selects single
lines, shift+click selects adjacent lines, and maybe alt+click closes
the popup and returns the selected items, which also would minimize
the number of clicks.

Anyway, I still don't believe that for multiple selection lists a
popup is a good idea. Other applications always use some kind of list
box for this, either embedded in the figure or as a form of dialog.
But I, too, am curious what you come up with.

Greetings,
Heiko

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us