bni@modulex.dk (Bent Nielsen) (09/17/90)
According to the Motif Style Guide Revision 1.0 two types of control boxes: list boxes and entry boxes is currently used. In the OSF/Motif Style Guide from Prentice Hall the list boxes is descripbed on page 5-4 and 5-5. My question is: 1. What is the widget name of this list box? (is it a XmSelectionBox). 2. Is the speed-search function a default function of this widget? (Incremental search through the list, when the user press one or more letters). 3. If not, how do I implement this function in my application, I can't find any Motif functions for incremental string compare. (If you have an example, please email me). Thanks in advance. -- Bent Nielsen <bni@modulex.dk> A/S MODULEX Phone: +45 44 53 30 11 Lyskaer 15 Telefax: +45 44 53 30 74 DK-2730 Herlev Denmark
mikey@eukanuba.wpd.sgi.com (Mike Yang) (09/17/90)
In article <694@modulex.dk>, bni@modulex.dk (Bent Nielsen) writes: |> 2. Is the speed-search function a default function of this widget? |> (Incremental search through the list, when the user press one or |> more letters). |> |> 3. If not, how do I implement this function in my application, I can't |> find any Motif functions for incremental string compare. (If you |> have an example, please email me). Incremental-search is not a standard part of list boxes. To implement one, you don't need XmString compare routines since presumably you're getting the text via an XmText or XmText-like field which return standard C strings. So, use a valueChanged callback to get null-terminated strings, then get the list of items from the list box and convert them to null-terminated strings (e.g. the reverse of XmStringCreate). Then, use something like strncmp to do the comparison. ----------------------------------------------------------------------- Mike Yang Silicon Graphics, Inc. mikey@sgi.com 415/335-1786