Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XmComboBox multi select?

33 views
Skip to first unread message

cantthinkofanickname

unread,
Jan 17, 2011, 10:50:45 PM1/17/11
to
Hi,

I have an urgent requirement to turn a single select XmComboBox into a
widget that can support multiple selections. I'm currently researching
my options. Can an XmComboBox be manipulated to support multiple
selections on the list widget underneath. I wonder if a XmSpinBox
might be a better option. But at this point
I'm looking for the fastest solution due to time constraints.

Thanks,
J

arahne

unread,
Jan 18, 2011, 4:50:08 PM1/18/11
to
Hello,

On 18. 01. 2011 04:50, cantthinkofanickname wrote:
> I have an urgent requirement to turn a single select XmComboBox into a
> widget that can support multiple selections. I'm currently researching
> my options. Can an XmComboBox be manipulated to support multiple
> selections on the list widget underneath. I wonder if a XmSpinBox
> might be a better option.

From my experience XmList supports multiple selection without problems.
But I don't know if XmComboBox's internal XmList can be changed to work
in that way.

Quoting Antony Fountain:
http://www.motifdeveloper.com/tips/tip14.html
"ComboBoxes are however associated with only a single selection at any
given time. If multiple choices may be made from a set of items, the
List remains the correct interface paradigm for the programmer to adopt."

Best regards,

Dušan Peterc
http://www.arahne.si

cantthinkofanickname

unread,
Jan 19, 2011, 8:42:51 PM1/19/11
to
Thanks for that. I came across that article as well.

Luckily the application is not using an XmComboBox as I originally
thought, but a custom
combo box made from a label and list widget. I have been able to
modify this widget
directly.

Thanks,
J.

Chris Sorenson

unread,
Jan 19, 2011, 11:19:55 PM1/19/11
to

You may already know this but if you compile editres support into your
application you can use it to get a graphical layout in tree form of
every widget in the application, which shows what type of widget every-
thing is, and each widget's name, the Xll ID of each one, and you can
dynamically set widget resources, and do a host of other somewhat
useful things like select a widget in editres and have that widget
blink in your application window.

All you have to do is add the line

#include <X11/Xmu/Editres.h>

to your source file and link against libXmu, i.e. -lXmu

cantthinkofanickname

unread,
Jan 19, 2011, 11:48:27 PM1/19/11
to
No! I didn't know this. I shall keep this mind for the future.

Thanks,
J.

Fred

unread,
Jan 20, 2011, 10:13:34 AM1/20/11
to

Not quite. You also have to add this line to your source code:
XtAddEventHandler( toplevel, 0, True, _XEditResCheckMessages,
NULL );
where toplevel is your top level shell.
--
Fred K

Chris Sorenson

unread,
Jan 20, 2011, 11:59:59 PM1/20/11
to
Fred wrote:
>
> Not quite. You also have to add this line to your source code:
> XtAddEventHandler( toplevel, 0, True, _XEditResCheckMessages,
> NULL );
> where toplevel is your top level shell.
> --
> Fred K

Fred, you are correct as always! Thank you sir... :)

0 new messages