scale.html

来自「perl教程」· HTML 代码 · 共 445 行 · 第 1/2 页

HTML
445
字号
<?xml version="1.0" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!-- saved from url=(0017)http://localhost/ -->
<script language="JavaScript" src="../../displayToc.js"></script>
<script language="JavaScript" src="../../tocParas.js"></script>
<script language="JavaScript" src="../../tocTab.js"></script>
<link rel="stylesheet" type="text/css" href="../../scineplex.css">
<title>Tk::Scale - Create and manipulate Scale widgets</title>
<link rel="stylesheet" href="../../Active.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>

<body>

<script>writelinks('__top__',2);</script>
<h1><a>Tk::Scale - Create and manipulate Scale widgets</a></h1>
<p><a name="__index__"></a></p>

<!-- INDEX BEGIN -->

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#standard_options">STANDARD OPTIONS</a></li>
	<li><a href="#widgetspecific_options">WIDGET-SPECIFIC OPTIONS</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<li><a href="#widget_methods">WIDGET METHODS</a></li>
	<li><a href="#bindings">BINDINGS</a></li>
	<li><a href="#keywords">KEYWORDS</a></li>
</ul>
<!-- INDEX END -->

<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>Tk::Scale - Create and manipulate Scale widgets</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p><em>$scale</em> = <em>$parent</em>-&gt;<strong>Scale</strong>(?<em>options</em>?);</p>
<p>
</p>
<hr />
<h1><a name="standard_options">STANDARD OPTIONS</a></h1>
<p><table cellspacing="0" cellpadding="0"><tr><td><strong>-activebackground</strong><td><strong>-font</strong><td><strong>-highlightthickness</strong><td><strong>-repeatinterval</strong>
<tr><td><strong>-background</strong><td><strong>-foreground</strong><td><strong>-orient</strong><td><strong>-takefocus</strong>
<tr><td><strong>-borderwidth</strong><td><strong>-highlightbackground</strong><td><strong>-relief</strong><td><strong>-troughcolor</strong>
<tr><td><strong>-cursor</strong><td><strong>-highlightcolor</strong><td><strong>-repeatdelay</strong></table></p>
<p>See <a href="../../lib/Tk/options.html">the Tk::options manpage</a> for details of the standard options.</p>
<p>
</p>
<hr />
<h1><a name="widgetspecific_options">WIDGET-SPECIFIC OPTIONS</a></h1>
<dl>
<dt><strong><a name="item_name_3a_bigincrement">Name:	<strong>bigIncrement</strong></a></strong>

<dt><strong><a name="item_class_3a_bigincrement">Class:	<strong>BigIncrement</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dbigincrement">Switch:	<strong>-bigincrement</strong></a></strong>

<dd>
<p>Some interactions with the scale cause its value to change by
``large'' increments;  this option specifies the size of the
large increments.  If specified as 0, the large increments default
to 1/10 the range of the scale.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_command">Name:	<strong>command</strong></a></strong>

<dt><strong><a name="item_class_3a_command">Class:	<strong>Command</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dcommand">Switch:	<strong>-command</strong></a></strong>

<dd>
<p>Specifies the prefix of a <a href="../../lib/Tk/callbacks.html">perl/Tk callback</a> to invoke whenever the scale's
value is changed via a method.
The actual command consists
of this option followed by a space and a real number indicating the
new value of the scale.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_digits">Name:	<strong>digits</strong></a></strong>

<dt><strong><a name="item_class_3a_digits">Class:	<strong>Digits</strong></a></strong>

<dt><strong><a name="item_switch_3a__2ddigits">Switch:	<strong>-digits</strong></a></strong>

<dd>
<p>An integer specifying how many significant digits should be retained
when converting the value of the scale to a string.
If the number is less than or equal to zero, then the scale picks
the smallest value that guarantees that every possible slider
position prints as a different string.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_from">Name:	<strong>from</strong></a></strong>

<dt><strong><a name="item_class_3a_from">Class:	<strong>From</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dfrom">Switch:	<strong>-from</strong></a></strong>

<dd>
<p>A real value corresponding to the left or top end of the scale.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_label">Name:	<strong>label</strong></a></strong>

<dt><strong><a name="item_class_3a_label">Class:	<strong>Label</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dlabel">Switch:	<strong>-label</strong></a></strong>

<dd>
<p>A string to display as a label for the scale.  For
vertical scales the label is displayed just to the right of the
top end of the scale.  For horizontal scales the label is displayed
just above the left end of the scale.  If the option is specified
as an empty string, no label is displayed.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_length">Name:	<strong>length</strong></a></strong>

<dt><strong><a name="item_class_3a_length">Class:	<strong>Length</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dlength">Switch:	<strong>-length</strong></a></strong>

<dd>
<p>Specifies the desired long dimension of the scale in screen units
(i.e. any of the forms acceptable to <strong>Tk_GetPixels</strong>).
For vertical scales this is the scale's height;  for horizontal scales
it is the scale's width.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_resolution">Name:	<strong>resolution</strong></a></strong>

<dt><strong><a name="item_class_3a_resolution">Class:	<strong>Resolution</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dresolution">Switch:	<strong>-resolution</strong></a></strong>

<dd>
<p>A real value specifying the resolution for the scale.
If this value is greater than zero then the scale's value will always be
rounded to an even multiple of this value, as will tick marks and
the endpoints of the scale.  If the value is less than zero then no
rounding occurs.  Defaults to 1 (i.e., the value will be integral).</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_showvalue">Name:	<strong>showValue</strong></a></strong>

<dt><strong><a name="item_class_3a_showvalue">Class:	<strong>ShowValue</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dshowvalue">Switch:	<strong>-showvalue</strong></a></strong>

<dd>
<p>Specifies a boolean value indicating whether or not the current
value of the scale is to be displayed.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_sliderlength">Name:	<strong>sliderLength</strong></a></strong>

<dt><strong><a name="item_class_3a_sliderlength">Class:	<strong>SliderLength</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dsliderlength">Switch:	<strong>-sliderlength</strong></a></strong>

<dd>
<p>Specfies the size of the slider, measured in screen units along the slider's
long dimension.  The value may be specified in any of the forms acceptable
to <strong>Tk_GetPixels</strong>.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_sliderrelief">Name:	<strong>sliderRelief</strong></a></strong>

<dt><strong><a name="item_class_3a_sliderrelief">Class:	<strong>SliderRelief</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dsliderrelief">Switch:	<strong>-sliderrelief</strong></a></strong>

<dd>
<p>Specifies the relief to use when drawing the slider, such as <strong>raised</strong>
or <strong>sunken</strong>.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_state">Name:	<strong>state</strong></a></strong>

<dt><strong><a name="item_class_3a_state">Class:	<strong>State</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dstate">Switch:	<strong>-state</strong></a></strong>

<dd>
<p>Specifies one of three states for the scale:  <strong>normal</strong>,
<strong>active</strong>, or <strong>disabled</strong>.
If the scale is disabled then the value may not be changed and the scale
won't activate.
If the scale is active, the slider is displayed using the color
specified by the <strong>activeBackground</strong> option.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_tickinterval">Name:	<strong>tickInterval</strong></a></strong>

<dt><strong><a name="item_class_3a_tickinterval">Class:	<strong>TickInterval</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dtickinterval">Switch:	<strong>-tickinterval</strong></a></strong>

<dd>
<p>Must be a real value.
Determines the spacing between numerical
tick marks displayed below or to the left of the slider.
If 0, no tick marks will be displayed.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_to">Name:	<strong>to</strong></a></strong>

<dt><strong><a name="item_class_3a_to">Class:	<strong>To</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dto">Switch:	<strong>-to</strong></a></strong>

<dd>
<p>Specifies a real value corresponding
to the right or bottom end of the scale.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?