ROOT logo
// @(#)root/eve:$Id: triangleset.C 26568 2008-12-01 20:55:50Z matevz $
// Author: Matevz Tadel

// Demonstrates usage of class TGPack.

TGPack *hp = 0;
TGPack *vp = 0;

TGTextButton* b = 0;

void pack()
{
   TGMainFrame* 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);
   hp->AddFrame(vp, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));

   b = new TGTextButton(hp, "Cilnouk");  hp->AddFrame(b);

   mf->AddFrame(hp, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));

   mf->Layout();
   mf->MapSubwindows();
   mf->MapWindow();
}
 pack.C:1
 pack.C:2
 pack.C:3
 pack.C:4
 pack.C:5
 pack.C:6
 pack.C:7
 pack.C:8
 pack.C:9
 pack.C:10
 pack.C:11
 pack.C:12
 pack.C:13
 pack.C:14
 pack.C:15
 pack.C:16
 pack.C:17
 pack.C:18
 pack.C:19
 pack.C:20
 pack.C:21
 pack.C:22
 pack.C:23
 pack.C:24
 pack.C:25
 pack.C:26
 pack.C:27
 pack.C:28
 pack.C:29
 pack.C:30
 pack.C:31
 pack.C:32
 pack.C:33
 pack.C:34
 pack.C:35