1demos::widget_lib::slide(3)  perl/Tk Documentation demos::widget_lib::slide(3)
2
3
4

NAME

6       Tk::SlideSwitch - a 2 position horizontal or vertical switch.
7

SYNOPSIS

9        use Tk::SlideSwitch;
10
11        my $sl = $frame1->SlideSwitch(
12            -bg          => 'gray',
13            -orient      => 'horizontal',
14            -command     => [$self => 'on'],
15            -llabel      => [-text => 'OFF', -foreground => 'blue'],
16            -rlabel      => [-text => 'ON',  -foreground => 'blue'],
17            -troughcolor => 'tan',
18        )->pack(qw/-side left -expand 1/);
19

DESCRIPTION

21       Tk::SlideSwitch is a Frame based composite mega-widget featuring a
22       binary Scale widget surrounded by two Label widgets.  The Scale's value
23       can be either 0 or 1. The Labels are positioned to the left and right
24       of the Scale if its orientation is horizontal, else on the top and
25       bottom of the Scale.
26

OPTIONS

28       In addition to all Scale options, the following option/value pairs are
29       also supported:
30
31       -llabel
32           A reference to an array of left (or top) Label configuration
33           options.
34
35       -rlabel
36           A reference to an array of right (or bottom) Label configuration
37           options.
38

METHODS

40       There are no special methods.
41

ADVERTISED WIDGETS

43       Component subwidgets can be accessed via the Subwidget method.  This
44       mega widget has no advertised subwidgets.
45

EXAMPLE

47       See Synopsis.
48

BUGS

50       This widget uses only the pack geometry manager.
51

AUTHOR

53       sol0@Lehigh.EDU
54
55       Copyright (C) 2002 - 2003, Steve Lidie. All rights reserved.
56
57       This program is free software; you can redistribute it and/or modify it
58       under the same terms as Perl itself.
59

KEYWORDS

61       SlideSwitch, Scale
62
63
64
65Tk804.03                          2014-06-10       demos::widget_lib::slide(3)
Impressum