Simple GUI Questions

How do I put a multi-line label? I want the text to automatically adjust itself in a small window.

Another question, what is a good way to make script wait for the user to click a text button? In the first example of user’s guide, it creates the window and then go back to root prompt. I’d like to wait, and when user clicks a button, use the information to continue the execution.

Thank you for the help.


About the label question, please take a look at $ROOTSYS/tutorials/guilabels.C

and for the script waiting for user action, here is a very simple example:

{ int ret = 0; cout << "before the question..." << endl; new TGMsgBox(gClient->GetRoot(), gClient->GetRoot(), "Small Test", "Do you see ths message box?", kMBIconAsterisk, kMBYes | kMBNo, &ret); cout << "the answer is " << ((ret == kMBYes) ? "yes" : "no!!") << endl; }