[comp.windows.x] Invoking "reset" action for command widgets.

mhardik@intel.com (Manoj Hardikar ~) (09/02/89)

Is there a way of invoking action procedures registered with a widget using the
action name ? For example, I would like to call the "reset" procedure for
command widget from my program. 

I am using command widgets which upon selection create dialog boxes (using
overrideshellWidget). Once the dialog box is created, the command widget
does not get a LeaveNotify event and therefore remains highlighted. I would
like the command widget to unhighlight when the dialog box is destroyed. 

Any help would be appreciated.


Thanks.

Manoj Hardikar
Intel Corporation

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (09/05/89)

> Is there a way of invoking action procedures registered with a widget using
> the action name ? For example, I would like to call the "reset" procedure for
> command widget from my program. 

> I am using command widgets which upon selection create dialog boxes (using
> overrideshellWidget). Once the dialog box is created, the command widget
> does not get a LeaveNotify event and therefore remains highlighted. I would
> like the command widget to unhighlight when the dialog box is destroyed. 

There is more hear than meets the eye.

1) Can you call Action Proceedures from your program?

This is not currently possible, but we have spec'd and interface for Release 4.
Furthor details will be avaliable as R4 approaches.

2) Your command buttons are not unhighlighting properly.

This is a bug in R3 (and previous) version of the MIT Xt Intrinsics, it will
be corrrected.

3) What can I do now?

[ hack alert!!! (this is a tempory solution until the R4 intrinsics solve
                 all your problems :-) ]

Try rebinding the reset action to take place immediately after notify, something
like this:

     <Btn1Up>:          notify() reset()


This changes the feel a bit, but it will keep the buttons from being left on.


						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213