TGShutter Help

Hi,

I am trying to write an application with ROOT and for now I am building a basic GUI for it (I am using the TGuiBuilder source file and the gui tutorials). I have been able to create a shutter and add items to it. Under each item I want to have a list of checkboxes. My problem is that I do not know how to remove the checkboxes at runtime. If anyone has any ideas please advise me. I have attached the source of the file that I am working on.

Radu
testgui.C (9.53 KB)

Hi,

Try for example something like this:

   fStallsEnableDisable = new TGCheckButton(fVerticalFrameIStalls1, "Show/Hide I_Stalls");
   [...]
   // now to remove it at run-time:
   fVerticalFrameIStalls1->HideFrame(fStallsEnableDisable);
   fVerticalFrameIStalls1->RemoveFrame(fStallsEnableDisable);
   // and if you don't want to re-use it, just delete the TGCheckButton
   delete fStallsEnableDisable;
   fStallsEnableDisable = 0;

Cheers, Bertrand.

Bertrand,

That worked like a charm!

Thx!

Radu