subsubsectionstar3_8_4_2.html
subsection3_8_4.html
subsection3_8_4.html
tableofcontents3_1.html
Next:
subsubsectionstar3_8_4_2.html
Chaining Methods
Up:
subsection3_8_4.html
Standard Initialization Methods
Previous:
subsection3_8_4.html
Standard Initialization Methods
The InitWidgetRec Method
The purpose of the
InitWidgetRec
method is to initialize the
variables of the widget instance. For example, the following
implementation of
tixArrowButton:InitWidgetRec
sets the
count
variable of each newly created instance to zero.
proc tixArrowButton:InitWidgetRec {w} {
upvar #0 $w data
set data(count) 0
}
Earlier, we showed how each widget you create is associated with an
array of the same name.  Within the methods, you always refer to
this array through the name
data
-the method then works
properly in each instance of the widget.
http://tix.sourceforge.net
http://tix.sourceforge.net
