XmList

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

4 posts / 0 new
Last post
XmList

Submitted by Anonymous on Tue, 01/08/2002 - 21:16. Developers
I`m looking for a widget simmilar to a XmList but has checkboxes in the list next to each item. Right now we`re using a rowcolumn with a bunch of checkboxes and labels. Its too slow. I guess it takes a lot of resources. Currently we generate about 1500 checkboxes/labels. Any Ideas?????!! Need help.... )
Eric

ICS_support

One quick change you can make is to have the XmRowColumn not manage all 1500*2 widgets but to show only the currently-displayed 10 or so values. You will have only 10 pairs of widgets and will change the labels as new options are shown. This should be much faster.

But 1500 choices!? That`s a tough interface in any case, and perhaps checkboxes aren`t the best choice of interface. Can you break the options up into topics so that they can be separated into smaller chunks? Then they`ll fit more naturally into already-available 1-of-N choice-making widgets in Motif.

Anonymous

I am looking for a widget like XmList which will allow me all the capabilites of a list box PLUS allow me to set the properties of individual items in the listbox.

For example I have 10 sale items in a list. I want the most sold item to be displayed in a different font, or color, or anything which will make it obvious for the user that this is a hot item.

If there is a way to do the following in XmList that is also acceptable. Any help?

ICS_support

Sure; the Open Motif XmList can display the 10 XmStrings in different fonts and in different colors. The XmStrings now embed the rendering information to let you do that. See the information on Font Tables and Renditions.

Note, though, that because of the mechanisms of how XmList, you may need to repeatedly XtSetValues() the XmNitems resource on the XmList to have it reflect the changes; the XmList itself doesn`t have a concept of displaying a particular selected item in some other way, as you want.

Note, also, that it is difficult for an application to depend on having a particular font`s being available; the application doesn`t know, and the server can substitute an equivalent. And note that depending on color, too, isn`t enough, as users may have monochrome screens or be color-blind. It may be best to use these indicators as supplements to some other information -- an XmMessageArea or somesuch displaying the current selection.