38void MyMainFrame::DoSelect()
43void MyMainFrame::DoExit()
54 fSelected =
new TList;
56 for (
int i = 0; i < 20; ++i) {
57 sprintf(tmp,
"Entry %i", i + 1);
58 fListBox->AddEntry(tmp, i + 1);
60 fListBox->Resize(100, 150);
65 fCheckMulti->Connect(
"Clicked()",
"MyMainFrame",
this,
"HandleButtons()");
69 show->SetToolTipText(
"Click here to print the selection you made");
70 show->Connect(
"Pressed()",
"MyMainFrame",
this,
"PrintSelected()");
73 exit->Connect(
"Pressed()",
"MyMainFrame",
this,
"DoExit()");
78 SetWindowName(
"List Box");
82 Resize(GetDefaultSize());
89MyMainFrame::~MyMainFrame()
99void MyMainFrame::HandleButtons()
104 id =
btn->WidgetId();
106 printf(
"HandleButton: id = %d\n",
id);
109 fListBox->SetMultipleSelections(
fCheckMulti->GetState());
112void MyMainFrame::PrintSelected()
118 if (fListBox->GetMultipleSelections()) {
119 Printf(
"Selected entries are:\n");
120 fListBox->GetSelectedEntries(fSelected);
123 Printf(
"Selected entries is: %d\n", fListBox->GetSelected());
#define ClassDefOverride(name, id)
R__EXTERN TApplication * gApplication
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize MapSubwindows
R__EXTERN void * gTQSender
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
A composite frame that layout their children in horizontal way.
This class describes layout hints used by the layout classes.
A listbox is a box, possibly with scrollbar, containing entries.
Defines top level windows that interact with the system Window Manager.
Yield an action as soon as it is clicked.
ROOT GUI Window base class.