***DisclosureTriangle [#mb8d3d88]
Tk widget implementation.~
http://reddog.s35.xrea.com/software/DisclosureTriangle.tcl
***License [#r15e514c]
Same as Tcl License
***Example [#n717d306]
source ../DisclosureTriangle.tcl
set msg {Give me chocolate}
set type ok
entry .e -textvariable msg -width 30
button .show -text Show -width 8 \
-command {tk_messageBox -message $msg -type $type}
button .exit -text Exit -width 8 -command exit
DisclosureTriangle::DisclosureTriangle .dt -separator 0 \
-font {{Arial Bold} 8 bold} -width 40 \
-showtext {Show Detail ...} -hidetext {Hide Detail}
pack .dt -side bottom -fill both -expand yes
pack .exit .show -side right -padx 2
pack .e -side left -fill x
set f [.dt getframe]
$f configure -bd 2 -relief groove
proc mkRadio {name value text} {
radiobutton $name -variable type -value $value \
-text $text -justify left
}
mkRadio $f.abort abortretryignore Abort
mkRadio $f.ok ok OK
mkRadio $f.okcancel okcancel {OK Cancel}
mkRadio $f.retrycancel retrycancel {Retry Cancel}
mkRadio $f.yesno yesno {Yes No}
mkRadio $f.yesnocancel yesnocancel {Yes No Cancel}
grid $f.abort $f.ok $f.okcancel -sticky w
grid $f.retrycancel $f.yesno $f.yesnocancel -sticky w
wm resizable . 0 0
focus -force .
-hide
#ref(DisclosureTriangle-hide1.gif,nolink,left)
#ref(DisclosureTriangle1-hide.gif,nolink,left)
-show
#ref(DisclosureTriangle-hide1.gif,nolink,left)
#ref(DisclosureTriangle1-show.gif,nolink,left)
***Comment [#ic822aa4]
#comment
----
[[CategoryTclTk]] [[CategorySoft]]
HTML convert time: 0.002 sec.