[code] //______________________________________________________________________________ XOptionDialog::XOptionDialog(XFrameSamples *parentframe, const TGWindow *window, const TGWindow *main, UInt_t w, UInt_t h, Int_t imexID, Bool_t isImport, UInt_t option) { // OptionDialog constructor if(kCS) cout << "---XOptionDialog::XOptionDialog------" << endl; fMain = new TGTransientFrame(window, main, w, h, option); fMain->Connect("CloseWindow()", "XOptionDialog", this, "DoCloseWindow()"); // code gClient->WaitFor(fMain); }//Constructor //______________________________________________________________________________ XOptionDialog::~XOptionDialog() { // OptionDialog destructor if(kCS) cout << "---XOptionDialog::~XOptionDialog------" << endl; // code delete fMain; }//Destructor //______________________________________________________________________________ void XOptionDialog::DoCloseWindow() { // Close window via the window manager if(kCS) cout << "------XOptionDialog::DoCloseWindow------" << endl; delete this; }//DoCloseWindow //______________________________________________________________________________ void XOptionDialog::DoClickCancel() { // Press Cancel button to close OptionDialog if(kCS) cout << "------XOptionDialog::DoClickCancel------" << endl; fMain->SendCloseMessage(); }//DoClickCancel [/code]