~ubuntu-branches/ubuntu/natty/perl-tk/natty

« back to all changes in this revision

Viewing changes to pod/DialogBox.pod

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Zander
  • Date: 2004-03-14 13:54:44 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040314135444-prc09u2or4dbr3to
Tags: 1:800.025-2
Add xlibs-dev to Build-Depends:,
Closes: #237942

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
=head1 DESCRIPTION
20
20
 
21
21
B<DialogBox> is very similar to B<Dialog> except that it allows
22
 
any widget in the top frame. B<DialogBox> creates two
23
 
frames---"top" and "bottom". The bottom frame shows all the
24
 
specified buttons, lined up from left to right. The top frame acts
 
22
any widget in the top Frame. B<DialogBox> creates two
 
23
Frames, I<top> and I<bottom>. The bottom Frame shows all the
 
24
specified Buttons, lined up from left to right. The top Frame acts
25
25
as a container for all other widgets that can be added with the
26
 
B<add()> method. The non-standard options recognized by
27
 
B<DialogBox> are as follows:
 
26
B<add()> method.
 
27
 
 
28
=head1 OPTIONS
 
29
 
 
30
The options recognized by B<DialogBox> are as follows:
28
31
 
29
32
=over 4
30
33
 
31
34
=item B<-title>
32
35
 
33
 
Specify the title of the dialog box. If this is not set, then the
 
36
Specify the title of the DialogBox. If this is not set, then the
34
37
name of the program is used.
35
38
 
36
39
=item B<-buttons>
37
40
 
38
 
The buttons to display in the bottom frame. This is a reference to
39
 
an array of strings containing the text to put on each
40
 
button. There is no default value for this. If you do not specify
41
 
any buttons, no buttons will be displayed.
 
41
The button names to display in the bottom Frame. This is a reference
 
42
to an array of strings containing the text to put on each
 
43
Button. There is no default value for this. If you do not specify any
 
44
button names, no Buttons are displayed.
42
45
 
43
46
=item B<-default_button>
44
47
 
45
 
Specifies the default button that is considered invoked when user
46
 
presses <Return> on the dialog box. This button is highlighted. If
47
 
no default button is specified, then the first element of the
 
48
Specifies the default Button that is considered invoked when user
 
49
presses <Return> on the DialogBox. This Button is highlighted. If
 
50
no default Button is specified, then the first element of the
48
51
array whose reference is passed to the B<-buttons> option is used
49
52
as the default.
50
53
 
59
62
=item B<add(>I<widget>, I<options>B<)>
60
63
 
61
64
Add the widget indicated by I<widget>. I<Widget> can be the name
62
 
of any Tk widget (standard or contributed). I<Options> are the
63
 
options that the widget accepts. The widget is advertized as a
64
 
subwidget of B<DialogBox>.
65
 
 
66
 
=item B<Show(>I<grab>B<)>
67
 
 
68
 
Display the dialog box, until user invokes one of the buttons in
69
 
the bottom frame. If the grab type is specified in I<grab>, then
70
 
B<Show> uses that grab; otherwise it uses a local grab. Returns
71
 
the name of the button invoked.
 
65
of any Tk widget (standard or contributed). I<options> are the
 
66
options that the widget accepts. The widget is advertised as a
 
67
subwidget of B<DialogBox>. The first character of I<widget> is
 
68
lower-cased and used as the advertised name.
 
69
 
 
70
=item B<Show(>I<?-global?>B<)>
 
71
 
 
72
Displays the Dialog until the user invokes one of the Buttons in the
 
73
bottom Frame. If the grab type I<-global> is specified, then B<Show>
 
74
uses that grab; otherwise it defaults to a local grab. Returns the
 
75
name of the Button invoked.
 
76
 
 
77
The actual Dialog is shown using the B<Popup> method. Any other
 
78
options supplied to B<Show> are passed to B<Popup>, and can be used to
 
79
position the Dialog on the screen. Please read L<Tk::Popup> for
 
80
details.
72
81
 
73
82
=back
74
83
 
 
84
=head1 ADVERTISED WIDGETS
 
85
 
 
86
=over 4
 
87
 
 
88
=item B<top>
 
89
 
 
90
The subwidget reference to the top half of the DialogBox widget, the Frame
 
91
containing widgets added by the B<add> method.
 
92
 
 
93
=item B<bottom>
 
94
 
 
95
The subwidget reference to the bottom half of the DialogBox widget, the Frame
 
96
containing the Button widgets.
 
97
 
 
98
=item B<B_"button-text">
 
99
 
 
100
Individual subwidget references to the Buttons in the DialogBox widget. The
 
101
subwidget name is the string I<B_> concatenated with the Button's -text
 
102
value.
 
103
 
75
104
=head1 BUGS
76
105
 
77
106
There is no way of removing a widget once it has been added to the
78
 
top frame.
 
107
top frame, unless you access the I<top> subwidget and go through the
 
108
child widgets.
79
109
 
80
 
There is no control over the appearance of the buttons in the
81
 
bottom frame nor is there any way to control the placement of the
82
 
two frames with respect to each other e.g. widgets to the left,
83
 
buttons to the right instead of widgets on the top and buttons on
84
 
the bottom always.
 
110
There is no control over the appearance of the Buttons in the
 
111
bottom Frame nor is there any way to control the placement of the
 
112
two Frames with respect to each other.
85
113
 
86
114
=head1 AUTHOR
87
115