DisclosureTriangle

Tk widget implementation.
http://reddog.s35.xrea.com/software/DisclosureTriangle.tcl

License

Same as Tcl License

Example

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 .

Comment



CategoryTclTk CategorySoft


Attach file: fileDisclosureTriangle1-show.gif 216 download [Information] fileDisclosureTriangle1-hide.gif 236 download [Information]

|New|Edit|Freeze|Diff|Backup|Attach|Copy|Rename|
Last-modified: 2005-07-06 (Wed) 00:00:00 (4884d)
HTML convert time: 0.019 sec.