Window and event

Hello,
I would like to develop a GUI with the TG* hierarchy (TGWindow and so on). I need to display a window (a TGTransientFrame that contain some text box that should be filled by the user) and read this data from another window (a TGMainFrame).
My problems are the following:

  1. how is possible to show and hide the TGTransientFrame? From this window I need to read the fields, and if I keep the window in memory I’m able to do this.
  2. How is possible to manage the events generated by a TGWindow? I have not found an explenation on the manual.

THANK YOU VERY MUCH!!!

Andrea Bulgarelli

Hi,

just create a TGTransientFrame, to show the frame use MapRaised() and to make it disappear, but stay in memory, use UnmapWindow(). At the point you can still access all data from the transient frame.

For more on event processing see: ftp://root.cern.ch/root/doc/chapter21.pdf

Cheers , Fons.

[quote=“rdm”]Hi,

just create a TGTransientFrame, to show the frame use MapRaised() and to make it disappear, but stay in memory, use UnmapWindow(). At the point you can still access all data from the transient frame.

[/quote]

Thank you. But how is possible to display a transient frame in an exclusive mode, that it means that after the creation of the window the exection point of the program wait in the line of the creation of the transient frame? An example

TGTransientFrame* tf = new TGTransientFrame(…)
cout << “Hello world” << endl;

After the creation of the tf, the “Hello world” message is printed. How is possible to wait until when the tf object is displayed?
Thank you very much.
Andrea Bulgarelli