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