Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches

Detailed Description

Demonstrates usage of class TGPack.

TGPack *hp = 0;
TGPack *vp = 0;
void pack()
{
auto mf = new TGMainFrame(0, 400, 300);
mf->SetWindowName("Foo");
hp = new TGPack(mf, mf->GetWidth(), mf->GetHeight());
hp->SetVertical(kFALSE);
b = new TGTextButton(hp, "Ailaaha");
hp->AddFrame(b);
vp = new TGPack(hp, hp->GetWidth(), hp->GetHeight());
b = new TGTextButton(vp, "Blaaaaa");
vp->AddFrameWithWeight(b, 0, 5);
b = new TGTextButton(vp, "Blooooo");
vp->AddFrameWithWeight(b, 0, 3);
b = new TGTextButton(vp, "Bleeeee");
vp->AddFrameWithWeight(b, 0, 5);
b = new TGTextButton(hp, "Cilnouk");
hp->AddFrame(b);
mf->Layout();
mf->MapSubwindows();
mf->MapWindow();
}
#define b(i)
Definition RSha256.hxx:100
constexpr Bool_t kFALSE
Definition RtypesCore.h:94
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
@ kLHintsExpandY
Definition TGLayout.h:31
@ kLHintsExpandX
Definition TGLayout.h:30
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
Defines top level windows that interact with the system Window Manager.
Definition TGFrame.h:397
Stack of frames in horizontal (default) or vertical stack.
Definition TGPack.h:40
Yield an action as soon as it is clicked.
Definition TGButton.h:142
Author
Matevz Tadel

Definition in file pack.C.