// Mainframe macro generated from application: /usr/local//bin/root.exe // By ROOT version 5.26/00 on 2010-02-10 09:22:01 #ifndef ROOT_TGDockableFrame #include "TGDockableFrame.h" #endif #ifndef ROOT_TGMenu #include "TGMenu.h" #endif #ifndef ROOT_TGMdiDecorFrame #include "TGMdiDecorFrame.h" #endif #ifndef ROOT_TG3DLine #include "TG3DLine.h" #endif #ifndef ROOT_TGMdiFrame #include "TGMdiFrame.h" #endif #ifndef ROOT_TGMdiMainFrame #include "TGMdiMainFrame.h" #endif #ifndef ROOT_TGMdiMenu #include "TGMdiMenu.h" #endif #ifndef ROOT_TGListBox #include "TGListBox.h" #endif #ifndef ROOT_TGNumberEntry #include "TGNumberEntry.h" #endif #ifndef ROOT_TGScrollBar #include "TGScrollBar.h" #endif #ifndef ROOT_TGuiBldHintsEditor #include "TGuiBldHintsEditor.h" #endif #ifndef ROOT_TGuiBldNameFrame #include "TGuiBldNameFrame.h" #endif #ifndef ROOT_TGFrame #include "TGFrame.h" #endif #ifndef ROOT_TGFileDialog #include "TGFileDialog.h" #endif #ifndef ROOT_TGShutter #include "TGShutter.h" #endif #ifndef ROOT_TGButtonGroup #include "TGButtonGroup.h" #endif #ifndef ROOT_TGCanvas #include "TGCanvas.h" #endif #ifndef ROOT_TGFSContainer #include "TGFSContainer.h" #endif #ifndef ROOT_TGuiBldEditor #include "TGuiBldEditor.h" #endif #ifndef ROOT_TGColorSelect #include "TGColorSelect.h" #endif #ifndef ROOT_TGButton #include "TGButton.h" #endif #ifndef ROOT_TGFSComboBox #include "TGFSComboBox.h" #endif #ifndef ROOT_TGLabel #include "TGLabel.h" #endif #ifndef ROOT_TGView #include "TGView.h" #endif #ifndef ROOT_TGMsgBox #include "TGMsgBox.h" #endif #ifndef ROOT_TRootGuiBuilder #include "TRootGuiBuilder.h" #endif #ifndef ROOT_TGTab #include "TGTab.h" #endif #ifndef ROOT_TGListView #include "TGListView.h" #endif #ifndef ROOT_TGSplitter #include "TGSplitter.h" #endif #ifndef ROOT_TGTextView #include "TGTextView.h" #endif #ifndef ROOT_TGStatusBar #include "TGStatusBar.h" #endif #ifndef ROOT_TGListTree #include "TGListTree.h" #endif #ifndef ROOT_TGuiBldGeometryFrame #include "TGuiBldGeometryFrame.h" #endif #ifndef ROOT_TGToolTip #include "TGToolTip.h" #endif #ifndef ROOT_TGToolBar #include "TGToolBar.h" #endif #ifndef ROOT_TRootEmbeddedCanvas #include "TRootEmbeddedCanvas.h" #endif #ifndef ROOT_TCanvas #include "TCanvas.h" #endif #ifndef ROOT_TGuiBldDragManager #include "TGuiBldDragManager.h" #endif #include "Riostream.h" class testListBox{ public: testListBox(); void fillListBox(); TGListBox *fListBox6563; }; void testListBox::fillListBox(){ fListBox6563->AddEntry("Entry 1",0); fListBox6563->AddEntry("Entry 2",1); fListBox6563->AddEntry("Entry 3",2); fListBox6563->AddEntry("Entry 4",3); fListBox6563->AddEntry("Entry 5",4); fListBox6563->AddEntry("Entry 6",5); fListBox6563->AddEntry("Entry 7",6); } testListBox::testListBox() { // main frame TGMainFrame *fMainFrame6829 = new TGMainFrame(gClient->GetRoot(),10,10,kMainFrame | kVerticalFrame); fMainFrame6829->SetLayoutBroken(kTRUE); TGTextButton *fTextButton560 = new TGTextButton(fMainFrame6829,"Click me to fill list box--->"); fTextButton560->SetTextJustify(36); fTextButton560->SetMargins(0,0,0,0); fTextButton560->SetWrapLength(-1); fTextButton560->Resize(200,120); fMainFrame6829->AddFrame(fTextButton560, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton560->MoveResize(40,56,200,120); fTextButton560->Connect("Clicked()", "testListBox", this, "fillListBox()"); // list box fListBox6563 = new TGListBox(fMainFrame6829); fListBox6563->Resize(192,276); fMainFrame6829->AddFrame(fListBox6563, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fListBox6563->MoveResize(288,40,192,276); fMainFrame6829->SetMWMHints(kMWMDecorAll, kMWMFuncAll, kMWMInputModeless); fMainFrame6829->MapSubwindows(); fMainFrame6829->Resize(fMainFrame6829->GetDefaultSize()); fMainFrame6829->MapWindow(); fMainFrame6829->Resize(1003,637); }