radiobutton.html

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

HTML
382
字号
<?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::Radiobutton - Create and manipulate Radiobutton 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::Radiobutton - Create and manipulate Radiobutton 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::Radiobutton - Create and manipulate Radiobutton widgets</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p><em>$radiobutton</em> = <em>$parent</em>-&gt;<strong>Radiobutton</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>-cursor</strong><td><strong>-highlightthickness</strong><td><strong>-takefocus</strong>
<tr><td><strong>-activeforeground</strong><td><strong>-disabledforeground</strong><td><strong>-image</strong><td><strong>-text</strong>
<tr><td><strong>-anchor</strong><td><strong>-font</strong><td><strong>-justify</strong><td><strong>-textvariable</strong>
<tr><td><strong>-background</strong><td><strong>-foreground</strong><td><strong>-padx</strong><td><strong>-underline</strong>
<tr><td><strong>-bitmap</strong><td><strong>-highlightbackground</strong><td><strong>-pady</strong><td><strong>-wraplength</strong>
<tr><td><strong>-borderwidth</strong><td><strong>-highlightcolor</strong><td><strong>-relief</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_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 a <a href="../../lib/Tk/callbacks.html">perl/Tk callback</a> to associate with the button.  This command
is typically invoked when mouse button 1 is released over the button
window.  The button's global variable (<strong>-variable</strong> option) will
be updated before the command is invoked.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_height">Name:	<strong>height</strong></a></strong>

<dt><strong><a name="item_class_3a_height">Class:	<strong>Height</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dheight">Switch:	<strong>-height</strong></a></strong>

<dd>
<p>Specifies a desired height for the button.
If an image or bitmap is being displayed in the button then the value is in
screen units (i.e. any of the forms acceptable to <strong>Tk_GetPixels</strong>);
for text it is in lines of text.
If this option isn't specified, the button's desired height is computed
from the size of the image or bitmap or text being displayed in it.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_indicatoron">Name:	<strong>indicatorOn</strong></a></strong>

<dt><strong><a name="item_class_3a_indicatoron">Class:	<strong>IndicatorOn</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dindicatoron">Switch:	<strong>-indicatoron</strong></a></strong>

<dd>
<p>Specifies whether or not the indicator should be drawn.  Must be a
proper boolean value.  If false, the <strong>relief</strong> option is
ignored and the widget's relief is always sunken if the widget is
selected and raised otherwise.</p>
</dd>
</li>
<dt><strong><a name="item_command_2dline_name_3a__2doffrelief">Command-Line Name: <strong>-offrelief</strong></a></strong>

<dt><strong><a name="item_database_name_3a_offrelief">Database Name:  <strong>offRelief</strong></a></strong>

<dt><strong><a name="item_database_class_3a_offrelief">Database Class: <strong>OffRelief</strong></a></strong>

<dd>
<p>Specifies the relief for the checkbutton when the indicator is not
drawn and the checkbutton is off.  The default value is <strong>raised</strong>.  By
setting this option to <strong>flat</strong> and setting
<strong>-indicatoron false -overrelief raised</strong>, the effect is achieved of
having a flat button
that raises on mouse-over and which is depressed when activated.  This
is the behavior typically exhibited by the Bold, Italic, and
Underline checkbuttons on the toolbar of a word-processor, for
example.</p>
</dd>
</li>
<dt><strong><a name="item_command_2dline_name_3a__2doverrelief">Command-Line Name: <strong>-overrelief</strong></a></strong>

<dt><strong><a name="item_database_name_3a_overrelief">Database Name:  <strong>overRelief</strong></a></strong>

<dt><strong><a name="item_database_class_3a_overrelief">Database Class: <strong>OverRelief</strong></a></strong>

<dd>
<p>Specifies  an alternative relief for the button, to be used when
the mouse cursor is over the widget.  This option can be used to
make  toolbar  buttons,  by configuring <strong>-relief flat -overrelief
raised</strong>.  If the value of this option is the empty  string,  then
no  alternative relief is used when the mouse cursor is over the
button.  The empty string is the default value.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_selectcolor">Name:	<strong>selectColor</strong></a></strong>

<dt><strong><a name="item_class_3a_background">Class:	<strong>Background</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dselectcolor">Switch:	<strong>-selectcolor</strong></a></strong>

<dd>
<p>Specifies a background color to use when the button is selected.
If <strong>indicatorOn</strong> is true then the color applies to the indicator.
Under Windows, this color is used as the background for the indicator
regardless of the select state.
If <strong>indicatorOn</strong> is false, this color is used as the background
for the entire widget, in place of <strong>background</strong> or <strong>activeBackground</strong>,
whenever the widget is selected.
If specified as an empty string then no special color is used for
displaying when the widget is selected.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_selectimage">Name:	<strong>selectImage</strong></a></strong>

<dt><strong><a name="item_class_3a_selectimage">Class:	<strong>SelectImage</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dselectimage">Switch:	<strong>-selectimage</strong></a></strong>

<dd>
<p>Specifies an image to display (in place of the <strong>image</strong> option)
when the radiobutton is selected.
This option is ignored unless the <strong>image</strong> option has been
specified.</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 radiobutton:  <strong>normal</strong>, <strong>active</strong>,
or <strong>disabled</strong>.  In normal state the radiobutton is displayed using the
<strong>foreground</strong> and <strong>background</strong> options.  The active state is
typically used when the pointer is over the radiobutton.  In active state
the radiobutton is displayed using the <strong>activeForeground</strong> and
<strong>activeBackground</strong> options.  Disabled state means that the radiobutton
should be insensitive:  the default bindings will refuse to activate
the widget and will ignore mouse button presses.
In this state the <strong>disabledForeground</strong> and
<strong>background</strong> options determine how the radiobutton is displayed.</p>
</dd>
</li>
<dt><strong><a name="item_name_3a_value">Name:	<strong>value</strong></a></strong>

<dt><strong><a name="item_class_3a_value">Class:	<strong>Value</strong></a></strong>

<dt><strong><a name="item_switch_3a__2dvalue">Switch:	<strong>-value</strong></a></strong>

⌨️ 快捷键说明

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