From 9f0d489e9cda59a8ed026be96fa56f9ecc1a33f7 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Fri, 7 May 2004 15:31:01 +0000 Subject: Switched from pack to grid; Demos are put in a namespace; No more name aliases for fonts --- demos/groupsPriority.tcl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'demos/groupsPriority.tcl') diff --git a/demos/groupsPriority.tcl b/demos/groupsPriority.tcl index 3b5c296..07bfbb6 100644 --- a/demos/groupsPriority.tcl +++ b/demos/groupsPriority.tcl @@ -13,7 +13,7 @@ namespace eval groupsPriority { wm title $w "Zinc Groups priority Demonstration" wm iconname $w Groups - variable defaultfont [font create -family Helvetica -size 10 -weight bold] + variable defaultfont [font create -family Helvetica -size 14 -weight bold] grid [button $w.dismiss -text Dismiss -command "destroy $w"] -row 2 -column 0 -pady 10 grid [button $w.code -text "See Code" -command "showCode $w"] -row 2 -column 1 -pady 10 @@ -33,7 +33,7 @@ namespace eval groupsPriority { ########################################### variable zinc_width 600 variable zinc_height 500 - grid [zinc $w.zinc -width $zinc_width -height $zinc_height -font 10x20 \ + grid [zinc $w.zinc -width $zinc_width -height $zinc_height -font $defaultfont \ -borderwidth 3 -relief sunken] -row 1 -column 0 -columnspan 2 -sticky news grid columnconfigure $w 0 -weight 1 grid columnconfigure $w 1 -weight 1 @@ -55,7 +55,9 @@ namespace eval groupsPriority { # this small group is for merging together : # the rectangle and the text showing its name set g [$w.zinc add group $group1 -visible 1 -atomic 1 -sensitive 1 -priority $counter] - set rec [$w.zinc add rectangle $g "[expr $centerx-100] [expr $centery-60] [expr $centerx+100] [expr $centery+60]" -fillcolor $color -filled 1] + set rec [$w.zinc add rectangle $g \ + [list [expr $centerx-100] [expr $centery-60] [expr $centerx+100] [expr $centery+60]] \ + -fillcolor $color -filled 1] set txt [$w.zinc add "text" $g -position "$centerx $centery" -text "pri=$counter" -anchor center] -- cgit v1.1