Path: utzoo!attcan!uunet!jarthur!bridge2!mips!sgi!shinobu!odin!sgihub!dragon!eukanuba.wpd.sgi.com!mikey From: mikey@eukanuba.wpd.sgi.com (Mike Yang) Newsgroups: comp.windows.x.motif Subject: Re: Motif Style Question re. List boxes (AGAIN). Keywords: Motif Style Guide. Message-ID: <1990Sep17.162424.9704@relay.wpd.sgi.com> Date: 17 Sep 90 16:24:24 GMT References: <694@modulex.dk> Sender: news@relay.wpd.sgi.com ( CNews Account ) Reply-To: mikey@sgi.com Organization: Silicon Graphics, Inc. Lines: 22 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