home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!osf.org!meeks
- From: meeks@osf.org (W. Scott Meeks)
- Newsgroups: comp.windows.x.motif
- Subject: Re: XmList partial hilite of item?
- Message-ID: <9209021525.AA29795@osf.osf.org>
- Date: 2 Sep 92 15:28:24 GMT
- References: <1992Aug31.205354.23684@rchland.ibm.com>
- Sender: daemon@ucbvax.BERKELEY.EDU
- Distribution: inet
- Organization: The Internet
- Lines: 28
-
- >Date: 31 Aug 92 20:53:54 GMT
- >From: newsgate.watson.ibm.com!yktnews!admin!dv2t1!shmdgljd@uunet.uu.net (Jay Schmidgall)
- >Is it possible* to select part of an item in an XmList? That is, I have a
- >list with say 20 items in it. I would like to select or have highlighted
- >just the 5th through 12th characters of the second item, for example.
-
- This is basically impossible. However, if all you want to be able to do is
- somehow distinguish characters within the text of an item, and you only
- need to be able to do this from within the application (in other words, the
- application selects the text but not the user) then it is possible.
-
- Remember that items in a list are XmStrings. This means that you can break
- an item into substrings and specify different fonts for each substring. So
- to make this more concrete, you're application could take the XmString for
- the second item in the list, break it into substrings, construct a new
- XmString containing a segment consisting of the 5th through 12th characters
- with a bold font specified, and replace the second item with this new
- XmString.
-
- Hope this helps. Let me know if you have anymore guestions.
-
- W. Scott Meeks
- Open Software Foundation
- meeks@osf.org
- (617) 621-7229
- Practice random kindness and senseless acts of beauty.
-
-
-