home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / windows / x / motif / 8311 < prev    next >
Encoding:
Text File  |  1993-01-04  |  1.3 KB  |  32 lines

  1. Newsgroups: comp.windows.x.motif
  2. Path: sparky!uunet!infonode!aggie!jim
  3. From: jim@aggie.b23b.ingr.com (Jim Cummings)
  4. Subject: Efficient Selection in List Widgets
  5. Message-ID: <1993Jan4.200027.19241@infonode.ingr.com>
  6. Sender: usenet@infonode.ingr.com (Usenet Administrator)
  7. Reply-To: jim@aggie.b23b.ingr.com
  8. Organization: Intergraph Corp. Huntsville, AL
  9. Date: Mon, 4 Jan 1993 20:00:27 GMT
  10. Lines: 20
  11.  
  12. I'm trying to efficiently select certain 'positions' within a Motif list widget
  13. that contains items with duplicate names.  I'm currently using XmListSelectPos
  14. on all positions I want selected, but this is very slow.  I would like to write
  15. a function similar to XmListSelectPos that accepts an array of positions to
  16. select instead of a single position.  Do you know how I can set the
  17. XmNselectedItems resource of the list so that it contains the items of the
  18. positions I want selected, but not those items that I do not want selected.
  19.  
  20. For example the list might contain:
  21.  
  22.    test
  23.    test
  24.    test
  25.  
  26. All three rows of the list contain the item "test".  I want to be able to
  27. select only positions 2 and 3, but not 1.  But since all 3 rows
  28. contain the same item string, I do not know how to set the XmNselectedItems 
  29. resource correctly to accomplish this.
  30.  
  31. Thanks in advance for any ideas.
  32.