Hi there,
I have the following function which produces a TGTransientFrame with a
TGPictureButton in it. I would like to add a small area below the Picture button
in which I can add text.
The TGTransientFrame is display whilst some calculations occur in the background
and I'd like to output what is going on at the bottom, ie. "Loading file xxx"
etc.
My knowledge of the GUI elements is limited (hence why I'm using a TGPictButton
simply to display an image!), so I'd appreciate an actual example.
Thanks in advance
Chris Milne
void processing()
{
TGPictureButton *fPictButton;
TGCompositeFrame *f2;
TGGroupFrame *fG1;
TGLayoutHints *fL3,*fL2;
fMain2 = new TGTransientFrame(gClient->GetRoot(), fMain2, 100, 200);
fMain2->ChangeOptions((fMain2->GetOptions() & ~kVerticalFrame) |
kHorizontalFrame);
f2 = new TGCompositeFrame(fMain2, 60, 20, kVerticalFrame);
fL3 = new TGLayoutHints(kLHintsTop | kLHintsLeft |
kLHintsExpandX | kLHintsExpandY,
2, 2, 2, 2);
fL2 = new TGLayoutHints(kLHintsTop | kLHintsRight | kLHintsExpandX,
2, 5, 0, 2);
fG1 = new TGGroupFrame(f2, "");
fPictButton = new TGPictureButton(fMain2,
gClient->GetPicture("process.xpm"));
fMain2->Resize(fPictButton->GetDefaultWidth(),
fPictButton->GetDefaultHeight());
fG1->AddFrame(fPictButton,fL3);
f2->AddFrame(fG1, fL3);
fMain2->AddFrame(f2, fL2);
fMain2->MapSubwindows();
gSystem->ProcessEvents();
fMain2->SetWindowName("Processing");
fMain2->SetWMSize(300,135);
fMain2->MapWindow();
fMain2->Move(400,300);
gSystem->ProcessEvents();
}
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:59 MET