home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 December
/
PCWorld_2000-12_cd.bin
/
Komunikace
/
Comanche
/
gui
/
guiPropertyPagesNotebook.tcl
< prev
next >
Wrap
Text File
|
2000-11-02
|
983b
|
43 lines
class guiPropertyPagesNotebook {
inherit guiObject
variable elements {}
variable noteBook
variable pageToXuiMapping
constructor { frame xuiObject guiBuilder} {
set subject $xuiObject
set i 0
set noteBook [NoteBook $frame.nb -width 400 -height 300]
foreach item [$subject getComponents] {
set itemName [$item getName]
$noteBook insert end $itemName -text [$item getLabel] \
-image [$item cget -icon]
set pageToXuiMapping($itemName) $item
set newFrame [$noteBook getframe $itemName]
lappend elements [$guiBuilder render $newFrame $item]
lappend items $itemName
}
#$noteBook compute_size
pack $noteBook -fill both -expand true
$noteBook raise [lindex $items 0]
}
destructor {
eval delete object $elements
eval destroy $noteBook
}
method enable {}
method disable {}
method queryState {}
method getSelectedPropertyPageXui {} {
return $pageToXuiMapping([$noteBook raise])
}
}