[comp.windows.x] Problem with Xw toggle and RowCol widgets

nsche@ATR-8.HAC.COM (Norm Scherer) (08/15/89)

I am having a problem with the HP widgets (Sun 3/50 SunOS 3.5,
with 11R3 from MIT, patch 1-9, the HP widgets were picked up from
uunet archives)

I have a set of widgets of class Toggle, managed by a RowCol widget.
I am using mode one_of_many.  
They seem to work as I expect, that is when I pick one of the toggles
any other selected one becomes unselected.  The one thing I want to do
that I haven't been able to is to have one of the toggles come up in 
the selected state.  I can make the toggle selected by using a
XtSetValues of XtNset but the RowCol manager doesn't seem to notice that.
The result it that the toggle set in that manner is not released
by the manager when another toggle is picked by the user.  

What I am trying to do is to have the set of toggles come up with
a default selected but have it act in the same manner as if that 
toggle had been selected by the user.  

Does any one have a suggestion on the correct way to get the
functionallity I am looking for.  It seems to me I must be overlooking
something obvious as that seems to be a rather normal way for
the toggles to work.   Maybe I'm loosing my mind!

Thanks for any help

	Norm Scherer
 	Software Engineering Division
 	Hughes Aircraft Co., Ground Systems Group,
 	Fullerton Ca.
 	(nsche%atr-2s@hac2arpa.hac.com or nsche@atr-2s.hac.com)
 
Opinions are my own, not those of HAC or anyone else I have ever met

nsche@ATR-8.HAC.COM (Norm Scherer) (08/16/89)

> What I am trying to do is to have the set of toggles come up with
> a default selected but have it act in the same manner as if that
> toggle had been selected by the user.

Christopher A. Rath (car@melmac.att.com) was so kind as to provide the
correct answer to the problem which I will give here for anyone else
who is as puzzled as I.

>>In order for the Xw row column widget to notice that a toggle has
>>been set, the XtNselect callbacks of the toggle must be called as
>>well as setting XtNset to True.
>>i.e.
>>...
>>XtSetArg(args[n], XtNset, (XtArgVal)True)       n++;
>>XtSetValues(toggle, args, n);
>>XtCallCallbacks(toggle, XtNselect, (caddr_t)0);


Works like a charm!

Thanks...
	Norm Scherer
 	Software Engineering Division
 	Hughes Aircraft Co., Ground Systems Group,
 	Fullerton Ca.
 	(nsche%atr-2s@hac2arpa.hac.com or nsche@atr-2s.hac.com)
 
Opinions are my own, not those of HAC or anyone else I have ever met