Manual Pages for UNIX Darwin command on man iwidgets_labeledwidget
MyWebUniversity

Manual Pages for UNIX Darwin command on man iwidgets_labeledwidget

iwidgets::labeledwidget(1) [incr Widgets] iwidgets::labeledwidget(1)

NAME

iwidgets::labeledwidget - Create and manipulate a labeled widget

SYNOPSIS

iiwwiiddggeettss::::llaabbeelleeddwwiiddggeett pathName ?options? IINNHHEERRIITTAANNCCEE

itk::Widget <- iwidgets::Labeledwidget

SSTTAANNDDAARRDD OOPPTTIIOONNSS bbaacckkggrroouunndd ccuurrssoorr ffoorreeggrroouunndd See the "options" manual entry for details on the standard options.

WWIIDDGGEETT-SSPPEECCIIFFIICC OOPPTTIIOONNSS

Name: ddiissaabblleeddFFoorreeggrroouunndd Class: DDiissaabblleeddFFoorreeggrroouunndd

Command-Line Switch: -ddiissaabblleeddffoorreeggrroouunndd

Specifies the foreground to be used when the state is disabled. Name: llaabbeellBBiittmmaapp Class: BBiittmmaapp

Command-Line Switch: -llaabbeellbbiittmmaapp

Specifies a bitmap to display in the widget, in any of the forms acceptable to TTkkGGeettBBiittmmaapp. This option overrides the labeltext option. Name: llaabbeellFFoonntt Class: FFoonntt

Command-Line Switch: -llaabbeellffoonntt

Specifies the font to be used for the label. Name: llaabbeellIImmaaggee Class: IImmaaggee

Command-Line Switch: -llaabbeelliimmaaggee

Specifies a image to be used as the label. The image may be any of the values created by the iimmaaggee ccrreeaattee command. This option overrides both the labelbitmap and labeletext options. Name: llaabbeellMMaarrggiinn Class: MMaarrggiinn

Command-Line Switch: -llaabbeellmmaarrggiinn

Specifies the distance between the childsite and label in any of the forms acceptable to TTkkGGeettPPiixxeellss. The default is 2 pixel. Name: llaabbeellPPooss Class: PPoossiittiioonn

Command-Line Switch: -llaabbeellppooss

Specifies the position of the label along the side of the child-

site: nnww, nn, nnee, ssww, ss, ssee, eenn, ee, eess, wwnn, ww, or wwss. The default is w. Name: llaabbeellTTeexxtt Class: TTeexxtt

Command-Line Switch: -llaabbeelltteexxtt

Specifies the text of the label around the childsite. Name: llaabbeellVVaarriiaabbllee Class: VVaarriiaabbllee

Command-Line Switch: -llaabbeellvvaarriiaabbllee

Specifies the text variable of the label around the childsite. Name: ssttaattee Class: SSttaattee

Command-Line Switch: -ssttaattee

Specifies one of two states for the label: nnoorrmmaall or ddiissaabblleedd. If the label is disabled then it is displayed in a disabled foreground color. The default is normal. Name: ssttiicckkyy Class: SSttiicckkyy

Command-Line Switch: -ssttiicckkyy

Specifies the "sticky-ness" of the childsite. The default value

is nsew, which is the the same behavior of the labeledwidget before this option was added.

DESCRIPTION

The iiwwiiddggeettss::::llaabbeelleeddwwiiddggeett command creates a labeled widget which con-

tains a label and child site. The child site is a frame which can filled with any widget via a derived class or though the use of the childsite method. This class was designed to be a general purpose base class for supporting the combination of label widget and a childsite.

The options include the ability to position the label around the child-

site widget, modify the font and margin, and control the display of the labels. MMEETTHHOODDSS The iiwwiiddggeettss::::llaabbeelleeddwwiiddggeett command creates a new Tcl command whose

name is pathName. This command may be used to invoke various opera-

tions on the widget. It has the following general form: pathName option ?arg arg ...? Option and the args determine the exact behavior of the command. The following commands are possible for labeledwidget widgets:

WWIIDDGGEETT-SSPPEECCIIFFIICC MMEETTHHOODDSS

pathName cchhiillddssiittee Return the path name of the child site. pathName ccggeett option Returns the current value of the configuration option given by

option. Option may have any of the values accepted by the iiwwiidd-

ggeettss::::llaabbeelleeddwwiiddggeett command. pathName ccoonnffiigguurree ?option? ?value option value ...? Query or modify the configuration options of the widget. If no

option is specified, returns a list describing all of the avail-

able options for pathName (see TTkkCCoonnffiigguurreeIInnffoo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or

more option-value pairs are specified, then the command modifies

the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the iiwwiiddggeettss::::llaabbeelleeddwwiiddggeett command. SSTTAATTIICC MMEETTHHOODDSS iiwwiiddggeettss::::LLaabbeelleeddwwiiddggeett::::aalliiggnnllaabbeellss widget ?widget ...? The alignlabels procedure takes a list of widgets derived from the Labeledwidget class and uses the label margin to make each widget have the same total space for the combination of label

and margin. The net effect is to left align the labels. Gener-

ally, this method is only useful with a label position of w, which is the default. CCOOMMPPOONNEENNTTSS Name: llaabbeell Class: llaabbeell The label component provides the label for the labeled widget. See the "label" widget manual entry for details on the label component item. Name: llwwcchhiillddssiittee Class: ffrraammee The lwchildsite component is the user child site for the labeled widget. See the "frame" widget manual entry for details on the lwchildsite component item. EEXXAAMMPPLLEE The labeledwidget was primarily meant to be a base class. The ScrolledListBox and EntryField are good examples of derived classes of the labeledwidget class. In order to provide equal support for composite classes, the 'childsite' methods also exists. The following is an example of 'childsite' method usage. package require Iwidgets 4.0

iwidgets::labeledwidget .lw -labeltext "Canvas Widget" -labelpos s

pack .lw -fill both -expand yes -padx 10 -pady 10

set cw [canvas [.lw childsite].c -relief raised -width 200 -height 200]

pack $cw -padx 10 -pady 10

AUTHOR Mark L. Ulferts KKEEYYWWOORRDDSS labeledwidget, widget Tk iwidgets::labeledwidget(1)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™