27 virtual ~MyMainFrame();
29 void ChangeStartLabel();
30 void ChangePauseLabel();
35 void MyMainFrame::ChangeStartLabel()
42 fStart->SetText(
"&Stop");
45 fStart->SetText(
"&Start");
51 void MyMainFrame::ChangePauseLabel()
58 fPause->SetText(
"&Resume");
61 fPause->SetText(
"&Pause");
74 fStart->Connect(
"Clicked()",
"MyMainFrame",
this,
"ChangeStartLabel()");
77 fStart->SetToolTipText(
"Click to toggle the button label (Start/Stop)");
81 fPause->Connect(
"Clicked()",
"MyMainFrame",
this,
"ChangePauseLabel()");
82 fPause->SetToolTipText(
"Click to toggle the button label (Pause/Resume)");
89 fExit =
new TGTextButton(
this,
"&Exit ",
"gApplication->Terminate(0)");
92 SetWindowName(
"Change Labels");
95 Resize(GetDefaultSize());
100 MyMainFrame::~MyMainFrame()
108 void buttonChangelabel()
111 new MyMainFrame(
gClient->GetRoot(), 350, 80);
#define ClassDef(name, id)