Sha256: ea8cfa72a7374c86a8af9996085a6d35a7b12f134eb5e574f453bcfcdae62ae9

Contents?: true

Size: 1.19 KB

Versions: 6

Compression:

Stored size: 1.19 KB

Contents

#
# Interactive test for labelframes.
#

lappend auto_path .
package require tile

puts "Loaded tile: [package ifneeded tile [package provide tile]]"
source [file join [file dirname [info script]] testutils.tcl]

#style map . -background {{} blue}

variable anchorStrings { nw n ne en e es se s sw ws w wn }
variable labelanchor nw

variable label "-labelanchor"

set c [ttk::labelframe .actl -text "-labelanchor"]
$c configure -text "" -labelwidget [ttk::label .lbl -textvariable label]
.lbl configure -relief solid -borderwidth 1

foreach string $anchorStrings {
    pack [ttk::radiobutton $c.$string -text $string \
    	-variable labelanchor -value $string -command setAnchor] \
    -side top -expand false -fill x ;
}
pack [ttk::entry $c.editlabel -textvariable label] \
    -side top -expand false -anchor w
bind $c.editlabel <KeyPress-Return> "$c configure -text \[%W get\]" 

proc setAnchor {} {
    variable labelanchor
    .actl configure -labelanchor $labelanchor
}
pack $c -side top -expand true -fill both -padx 10 -pady 10
setAnchor

bind . <Key-Escape> [list destroy .]
bind . <Alt-KeyPress-l> { .actl configure -labelwidget {} -text $::label }
bind . <Alt-KeyPress-w> { .actl configure -labelwidget .lbl }

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
Pratt-1.6.8 pkgs/tile-0.8.2/tests/labelframe.tcl
Pratt-1.6.5 pkgs/tile-0.8.2/tests/labelframe.tcl
Pratt-1.6.4 pkgs/tile-0.8.2/tests/labelframe.tcl
Pratt-1.6.2 pkgs/tile-0.8.2/tests/labelframe.tcl
Pratt-1.5.8 pkgs/tile-0.8.2/tests/labelframe.tcl
Pratt-1.5.6 pkgs/tile-0.8.2/tests/labelframe.tcl