Changeset 1929 for trunk/gui/scripts/groupentry.tcl
- Timestamp:
- Oct 22, 2010, 4:06:10 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/groupentry.tcl
r1342 r1929 49 49 itcl::body Rappture::GroupEntry::constructor {owner path args} { 50 50 if {[catch {$owner isa Rappture::ControlOwner} valid] != 0 || !$valid} { 51 51 error "bad object \"$owner\": should be Rappture::ControlOwner" 52 52 } 53 53 set _owner $owner … … 55 55 56 56 itk_component add heading { 57 57 ::label $itk_interior.heading -anchor w 58 58 } { 59 60 61 59 usual 60 rename -background -headingbackground headingBackground Background 61 rename -foreground -headingforeground headingForeground Foreground 62 62 } 63 63 64 64 $itk_component(heading) configure \ 65 65 -text [$_owner xml get $_path.about.label] 66 66 Rappture::Tooltip::for $itk_component(heading) \ 67 67 [$_owner xml get $_path.about.description] 68 68 69 69 itk_component add outline { 70 70 frame $itk_interior.outline -borderwidth 1 71 71 } { 72 73 74 72 usual 73 ignore -borderwidth 74 rename -background -headingbackground headingBackground Background 75 75 } 76 76 pack $itk_component(outline) -expand yes -fill both 77 77 78 78 itk_component add inner { 79 79 frame $itk_component(outline).inner -borderwidth 3 80 80 } { 81 82 81 usual 82 ignore -borderwidth 83 83 } 84 84 pack $itk_component(inner) -expand yes -fill both … … 129 129 itcl::configbody Rappture::GroupEntry::heading { 130 130 if {![string is boolean -strict $itk_option(-heading)]} { 131 131 error "bad value \"$itk_option(-heading)\": should be boolean" 132 132 } 133 133 134 134 set str [$itk_component(heading) cget -text] 135 135 if {$itk_option(-heading) && "" != $str} { 136 137 138 139 140 136 eval pack forget [pack slaves $itk_component(hull)] 137 pack $itk_component(heading) -side top -fill x 138 pack $itk_component(outline) -expand yes -fill both 139 $itk_component(outline) configure -borderwidth 1 140 $itk_component(inner) configure -borderwidth 3 141 141 } else { 142 143 144 142 pack forget $itk_component(heading) 143 $itk_component(outline) configure -borderwidth 0 144 $itk_component(inner) configure -borderwidth 0 145 145 } 146 146 } … … 152 152 set valid {normal disabled} 153 153 if {[lsearch -exact $valid $itk_option(-state)] < 0} { 154 154 error "bad value \"$itk_option(-state)\": should be [join $valid {, }]" 155 155 } 156 156 }
Note: See TracChangeset
for help on using the changeset viewer.