ClassyTcl

  Dialog

Home    Documentation    Screenshots    Binary distributions    Source distribution   

subclass of Toplevel
Dialog produces "intelligent" dialog. They have a simple option to make them resizable or not. They automatically assume a reasonable minimum size based on their content (The dialog will be placed on the screen and its size calculated at the first idle moment after dialog creation. The dialog will place itself so that the mouse pointer is is positioned over it, without being placed partly out of the screen. If it is resized, it remembers its size for the next display.

By default, the dialog has a "Close" button that destroys the dialog on invocation. Other buttons can be added easily using the add method. Invoking a command by clicking on a button (or using a key shortcut) will close the dialog, unless the button is persistent, or was invoked using the Adjust mouse button. The dialog has one component named options, which is a frame in which optionmenus, entries, etc. can be placed.

Dialog specific options

Command-Line Name: -closecommand
Database Name: ?
Database Class: ?
commands invoked when invoking the "Close" button
Command-Line Name: -help
Database Name: help
Database Class: Help
add a help button. A file with the name helpvalue.html will be shown in a help window whein the button is invoked

Dialog specific methods

pathname add button text command ?default?
add a button with name $button to the dialog. The button will display the $text. When it is invoked, $command will be executed. If the word default is added, the button will be displayed differently and invoked by default (eg. when pressing Enter).
pathname delete button
remove the button with name $button to the dialog.
pathname rename button newname
rename the button with name $button to the dialog to $newname.
pathname button ?button?
returns a list of buttons; if button is given, returns the parameters given to this button.
pathname persistent ?option button ...?
Without arguments, the method returns a list of all persistent buttons Option can be:
pathname invoke button ?Action/Adjust?
pathname close

Peter De Rijk
hosted at SourceForge.net Logo