.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "demos::widget_lib::slide 3" .TH demos::widget_lib::slide 3 2023-07-25 Tk804.036 "perl/Tk Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Tk::SlideSwitch \- a 2 position horizontal or vertical switch. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Tk::SlideSwitch; \& \& my $sl = $frame1\->SlideSwitch( \& \-bg => \*(Aqgray\*(Aq, \& \-orient => \*(Aqhorizontal\*(Aq, \& \-command => [$self => \*(Aqon\*(Aq], \& \-llabel => [\-text => \*(AqOFF\*(Aq, \-foreground => \*(Aqblue\*(Aq], \& \-rlabel => [\-text => \*(AqON\*(Aq, \-foreground => \*(Aqblue\*(Aq], \& \-troughcolor => \*(Aqtan\*(Aq, \& )\->pack(qw/\-side left \-expand 1/); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Tk::SlideSwitch is a Frame based composite mega-widget featuring a binary Scale widget surrounded by two Label widgets. The Scale's value can be either 0 or 1. The Labels are positioned to the left and right of the Scale if its orientation is horizontal, else on the top and bottom of the Scale. .SH OPTIONS .IX Header "OPTIONS" In addition to all Scale options, the following option/value pairs are also supported: .IP \fB\-llabel\fR 4 .IX Item "-llabel" A reference to an array of left (or top) Label configuration options. .IP \fB\-rlabel\fR 4 .IX Item "-rlabel" A reference to an array of right (or bottom) Label configuration options. .SH METHODS .IX Header "METHODS" There are no special methods. .SH "ADVERTISED WIDGETS" .IX Header "ADVERTISED WIDGETS" Component subwidgets can be accessed via the \fBSubwidget\fR method. This mega widget has no advertised subwidgets. .SH EXAMPLE .IX Header "EXAMPLE" See Synopsis. .SH BUGS .IX Header "BUGS" This widget uses only the pack geometry manager. .SH AUTHOR .IX Header "AUTHOR" sol0@Lehigh.EDU .PP Copyright (C) 2002 \- 2003, Steve Lidie. All rights reserved. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH KEYWORDS .IX Header "KEYWORDS" SlideSwitch, Scale