[comp.windows.x.motif] Selection Box Widget

nazgul@alphalpha.com (Kee Hinckley) (07/26/90)

> I am creating a selection box widget with a list of items.  Once a single
> item selection has been made, I want to be able to "de-highlight" that 
> selection.  I've tried to reset the following attributes of the selection 
> box without any luck:
> 
>         XtSetArg (Args[n], XmNlistItems, line_item); n++;
>         XtSetArg (Args[n], XmNlistItemCount, number_of_items); n++;
>         XtSetValues(stream_selection_box, Args, n);
Maybe I'm missing something.  What do these SetArgs have to do with
dehighlighting a selection?  Don't you just want XmListDeselect[AllItems/
Item/Pos]?

Or is the problem the initial one of putting things into the list at
all?

In that case I'd use XmListAddItem[Unselected], I'm not sure how
the resource equivalents work.  (Motif has a bunch of cases where
a function seems to do exactly the same thing as a resource.  I
have no idea why, but I tend to go with the function on the assumption
that someone created it for a reason.)

Alphalpha Software, Inc.	|	motif-request@alphalpha.com
nazgul@alphalpha.com		|-----------------------------------
617/646-7703 (voice/fax)	|	Proline BBS: 617/641-3722

I'm not sure which upsets me more; that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

-------

cuweiss.US2.oramail@us.oracle.com ("Connie Weiss ", note the U =>) (07/27/90)

In-Reply-To: DVLSEQ:motif-request@alphalpha.com's message of 07-25-90 16:05


Try XmListDeselectPos or XmListDeselectItem.
This works fine for me. 

Connie Weiss
cuweiss@oracle.com


---- Included Message ----

Received: 07-25-90 21:36                         Sent: 07-25-90 16:05 
From: DVLSEQ:motif-request@alphalpha.com
To: motif@alphalpha.com (Motif Mailing List) 
Subject: Selection Box Widget
Reply-To: DVLSEQ:motif-request@alphalpha.com
Resent-From:  nazgul@alphalpha.com (Kee Hinckley)
Resent-Message-Id:  <9007260132.AA08671@alphalpha.com>
X-Mailer:  ELM [version 2.2 PL16]
Resent-To:  motif-tmp@alphalpha.com
Resent-Date:  Wed, 25 Jul 90 21:32:52 EDT


Hello motif world,

I asked this question a while ago and got no answers.  So! Here it goes
again...

I am creating a selection box widget with a list of items.  Once a single
item selection has been made, I want to be able to "de-highlight" that 
selection.  I've tried to reset the following attributes of the selection 
box without any luck:

        XtSetArg (Args[n], XmNlistItems, line_item); n++;
        XtSetArg (Args[n], XmNlistItemCount, number_of_items); n++;
        XtSetValues(stream_selection_box, Args, n);

Does anyone have any suggestions?	
---
   A  TTTTTT IIIIII       =:=  Annette Sahakian                       =:=
  AAA   TT     II         =:=         Jet Propulsion Laboratory       =:=
 AAAAA  TT     II         =:=               ati@thyme.jpl.nasa.gov    =:=
AAAAAAA TT   IIIIII       =:=                          (818) 354-8113 =:=