Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / Tk / DialogBox.pod
CommitLineData
86530b38
AT
1
2=head1 NAME
3
4Tk::DialogBox - create and manipulate a dialog screen.
5
6=for pm Tixish/DialogBox.pm
7
8=for category Tix Extensions
9
10=head1 SYNOPSIS
11
12 use Tk::DialogBox
13 ...
14 $d = $top->DialogBox(-title => "Title", -buttons => ["OK", "Cancel"]);
15 $w = $d->add(Widget, args);
16 ...
17 $button = $d->Show;
18
19=head1 DESCRIPTION
20
21B<DialogBox> is very similar to B<Dialog> except that it allows
22any widget in the top frame. B<DialogBox> creates two
23frames---"top" and "bottom". The bottom frame shows all the
24specified buttons, lined up from left to right. The top frame acts
25as a container for all other widgets that can be added with the
26B<add()> method. The non-standard options recognized by
27B<DialogBox> are as follows:
28
29=over 4
30
31=item B<-title>
32
33Specify the title of the dialog box. If this is not set, then the
34name of the program is used.
35
36=item B<-buttons>
37
38The buttons to display in the bottom frame. This is a reference to
39an array of strings containing the text to put on each
40button. There is no default value for this. If you do not specify
41any buttons, no buttons will be displayed.
42
43=item B<-default_button>
44
45Specifies the default button that is considered invoked when user
46presses <Return> on the dialog box. This button is highlighted. If
47no default button is specified, then the first element of the
48array whose reference is passed to the B<-buttons> option is used
49as the default.
50
51=back
52
53=head1 METHODS
54
55B<DialogBox> supports only two methods as of now:
56
57=over 4
58
59=item B<add(>I<widget>, I<options>B<)>
60
61Add the widget indicated by I<widget>. I<Widget> can be the name
62of any Tk widget (standard or contributed). I<Options> are the
63options that the widget accepts. The widget is advertized as a
64subwidget of B<DialogBox>.
65
66=item B<Show(>I<grab>B<)>
67
68Display the dialog box, until user invokes one of the buttons in
69the bottom frame. If the grab type is specified in I<grab>, then
70B<Show> uses that grab; otherwise it uses a local grab. Returns
71the name of the button invoked.
72
73=back
74
75=head1 BUGS
76
77There is no way of removing a widget once it has been added to the
78top frame.
79
80There is no control over the appearance of the buttons in the
81bottom frame nor is there any way to control the placement of the
82two frames with respect to each other e.g. widgets to the left,
83buttons to the right instead of widgets on the top and buttons on
84the bottom always.
85
86=head1 AUTHOR
87
88B<Rajappa Iyer> rsi@earthling.net
89
90This code is distributed under the same terms as Perl.
91
92=cut
93