This macro gives an example of different buttons' layout.
To run it do either:
.x buttonsLayout.C
.x buttonsLayout.C++
private:
public:
virtual ~MyMainFrame();
};
{
2, 0, 2, 2));
2, 2, 2, 2));
gClient->GetColorByName(
"yellow", yellow);
help->ChangeBackground(yellow);
2, 2, 2, 2));
3, 2, 2, 2));
3, 2, 2, 2));
exit =
new TGTextButton(cframe2,
"&Exit ",
"gApplication->Terminate(0)");
2, 0, 2, 2));
SetWindowName("Buttons' Layout");
SetWMSizeHints(200, 80, 320, 320, 1, 1);
MapSubwindows();
Resize(GetDefaultSize());
MapWindow();
}
MyMainFrame::~MyMainFrame()
{
Cleanup();
}
void buttonsLayout()
{
new MyMainFrame(
gClient->GetRoot(), 350, 80);
}
#define ClassDef(name, id)
The base class for composite widgets (menu bars, list boxes, etc.).
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
This class describes layout hints used by the layout classes.
Defines top level windows that interact with the system Window Manager.
Yield an action as soon as it is clicked.
A composite frame that layout their children in vertical way.
ROOT GUI Window base class.
- Author
- Ilka Antcheva 1/12/2006
Definition in file buttonsLayout.C.