=head1 NAME Tk::DialogBox - create and manipulate a dialog screen. =for pm Tixish/DialogBox.pm =for category Tix Extensions =head1 SYNOPSIS use Tk::DialogBox ... $d = $top->DialogBox(-title => "Title", -buttons => ["OK", "Cancel"]); $w = $d->add(Widget, args); ... $button = $d->Show; =head1 DESCRIPTION B is very similar to B except that it allows any widget in the top frame. B creates two frames---"top" and "bottom". The bottom frame shows all the specified buttons, lined up from left to right. The top frame acts as a container for all other widgets that can be added with the B method. The non-standard options recognized by B are as follows: =over 4 =item B<-title> Specify the title of the dialog box. If this is not set, then the name of the program is used. =item B<-buttons> The buttons to display in the bottom frame. This is a reference to an array of strings containing the text to put on each button. There is no default value for this. If you do not specify any buttons, no buttons will be displayed. =item B<-default_button> Specifies the default button that is considered invoked when user presses on the dialog box. This button is highlighted. If no default button is specified, then the first element of the array whose reference is passed to the B<-buttons> option is used as the default. =back =head1 METHODS B supports only two methods as of now: =over 4 =item BI, IB<)> Add the widget indicated by I. I can be the name of any Tk widget (standard or contributed). I are the options that the widget accepts. The widget is advertized as a subwidget of B. =item BIB<)> Display the dialog box, until user invokes one of the buttons in the bottom frame. If the grab type is specified in I, then B uses that grab; otherwise it uses a local grab. Returns the name of the button invoked. =back =head1 BUGS There is no way of removing a widget once it has been added to the top frame. There is no control over the appearance of the buttons in the bottom frame nor is there any way to control the placement of the two frames with respect to each other e.g. widgets to the left, buttons to the right instead of widgets on the top and buttons on the bottom always. =head1 AUTHOR B rsi@earthling.net This code is distributed under the same terms as Perl. =cut