home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 December
/
PCWorld_2000-12_cd.bin
/
Komunikace
/
Comanche
/
gui
/
guiLabel.tcl
< prev
next >
Wrap
Text File
|
2000-11-02
|
852b
|
39 lines
class guiLabel {
inherit guiObject
variable label
variable value
constructor {frame xuiString} {
set subject $xuiString
set label [Label $frame.l ]
$label configure -text [$subject getLabel] -justify left
if ![string compare [set value [$subject getValue]] ""] {
set value [set default [$subject getDefault]]
}
pack $label -side left
}
method enable {}
method disable {}
method queryState {}
method getLabelLength {} {
return [string length [$subject getLabel]]
}
method setLabelLength { length } { $label configure -width $length }
}
body guiLabel::enable {} {
set state 1
$label configure -state normal
}
body guiLabel::disable {} {
set state 0
$label configure -state disabled
}
body guiLabel::queryState {} {
return $state
}