pack.C

Go to the documentation of this file.
00001 // @(#)root/eve:$Id: triangleset.C 26568 2008-12-01 20:55:50Z matevz $
00002 // Author: Matevz Tadel
00003 
00004 // Demonstrates usage of class TGPack.
00005 
00006 TGPack *hp = 0;
00007 TGPack *vp = 0;
00008 
00009 TGTextButton* b = 0;
00010 
00011 void pack()
00012 {
00013    TGMainFrame* mf = new TGMainFrame(0, 400, 300);
00014    mf->SetWindowName("Foo");
00015 
00016    hp = new TGPack(mf, mf->GetWidth(), mf->GetHeight());
00017    hp->SetVertical(kFALSE);
00018 
00019    b = new TGTextButton(hp, "Ailaaha");  hp->AddFrame(b);
00020 
00021    vp = new TGPack(hp, hp->GetWidth(), hp->GetHeight());
00022    b = new TGTextButton(vp, "Blaaaaa");  vp->AddFrameWithWeight(b, 0, 5);
00023    b = new TGTextButton(vp, "Blooooo");  vp->AddFrameWithWeight(b, 0, 3);
00024    b = new TGTextButton(vp, "Bleeeee");  vp->AddFrameWithWeight(b, 0, 5);
00025    hp->AddFrame(vp, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
00026 
00027    b = new TGTextButton(hp, "Cilnouk");  hp->AddFrame(b);
00028 
00029    mf->AddFrame(hp, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
00030 
00031    mf->Layout();
00032    mf->MapSubwindows();
00033    mf->MapWindow();
00034 }

Generated on Tue Jul 5 15:43:51 2011 for ROOT_528-00b_version by  doxygen 1.5.1