home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / windows / x / motif / 5970 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  1.7 KB

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