Re: Another PVWAVE widget question [message #4863] |
Fri, 18 August 1995 00:00 |
rep2857
Messages: 28 Registered: December 1994
|
Junior Member |
|
|
In article <40v21o$8gm@seralph9.essex.ac.uk>,
Pearson J E <jepear@essex.ac.uk> wrote:
> I have created a button box widget ontop of the initial layout widget. In the
> button box call back procedure, I want to be able to close the original window
> and then display a new one. Is this possible? From what I can gather the
> button box callback procedure has no handle on the original window in order to
> close it! Also in order to display a new window is the main window widget the
> one to use?
Cc'd to jepear@essex.ac.uk
You can use the /Hide and /Display keywords to WwSetValue to manage
this. If you store the widget ID's in a common block (a structure of
ID's is easiest for me) and have that common block appear in the button
box callback procedure, you can reference the original widget. When you
select the button box in your original widget hierarchy, you /Display
the new widget and /Hide the original widget. When you select the
appropriate item in the new widget, the callback can /Hide the new
widget and /Display the old widget.
I usually have all of the pop-ups created in the main portion of my
program and /Hide them before I realize the entire application. The
benefit to this is faster action from the application. The drawback is
slower start-up time at the time you call the application. The ID's
are in a structure called wdata (widget data). When I select a button
in the main application, I make a couple calls like:
status = WwSetValue(wdata.popup, /Display)
status = WwSetValue(wdata.base, /NonSensitive)
or
status = WwSetValue(wdata.base, /Hide)
When I select a done or cancel button from the pop-up, the callbacks
are something like:
status = WwSetValue(wdata.popup, /Hide)
status = WwSetValue(wdata.base, /Sensitive)
or
status = WwSetValue(wdata.base, /Display)
Mike Schienle Hughes Santa Barbara Research Center
Home: mgs@seldon.terminus.com Work: rep2857@sbsun0010.sbrc.hac.com
Contract Employee - Will visualize data for large amounts of money
|
|
|