summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl.straw/lib/Tk/Scrolled.pod
blob: cd6c648ef5e5dec5e6f2fde1715d61e02da090f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
=head1 NAME

Tk::Scrolled - Create a widget with attached scrollbar(s)

=for category Derived Widgets

=for index_group Perl/Tk Constructs

=head1 SYNOPSIS

S<    >I<$whatever> = I<$parent>-E<gt>B<Scrolled>(I<Whatever> ?,B<-scrollbars>=E<gt>I<where>? ?,...?);

=head1 DESCRIPTION

To stop a flood of B<ScrlWhatever> widgets Perl/Tk introcuded the special
constructor B<Scrolled>.  B<Scrolled> creates a widget of the given Class
I<Whatever> with attached L<scrollbar(s)|Tk::Scrollbar>.

=head1 OPTIONS

All options beside B<-scrollbars> explained below are passed to
the I<Whatever> widget constructor.

=over 4

=item -scrollbars

Expects as argument the position where the scrollbars should be
created:  B<w>, B<e> or B<n>, B<s> or a combination of
them.  If the one or both positions are prefixed with B<o> the
scrollbar will only show up if there is a 'real' need to scroll.

=back

=head1 ADVERTISED SUBWIDGETS

See L<Tk::mega/"Subwidget"> how to use advertised widgets.

=over 4

=item scrolled

the scrolled widget

=item I<widget>

same as B<scrolled> above.  I<widget> is the kind of widget passed
to scrolled as first argument in all lowercase.

=item xscrollbar

the B<Scrollbar> widget used for horizontal scrolling (if it exists)

=item yscrollbar

the B<Scrollbar> widget used for vertical scrolling (if it exists)

=item corner

a frame in the corner between the vertical and horizontal scrolbar

=back

=head1 BUGS

If a widget does not support I<-{x,y}scrollcommand> options,
B<Scrolled> does not complain if the specified widget class does
not support them.  E.g.,

S<    >I<$parent>->B<Scrolled>(B<'Button'>, ...)

One does not get an error message or warning when one tries to
configure scrollbars after the widget construction:

S<    >I<$ascrolled>->B<configure>(B<-scrollbars> => B<'e'>);

=head1 SEE ALSO

L<Tk::Scrollbar|Tk::Scrollbar>

=head1 KEYWORDS

scrolled, scrollbar

=cut