diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2010-01-04 12:11:47 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2010-01-04 12:11:47 (GMT) |
commit | 5c754a2a7dbb6305a140012bd24f68e32b2375ff (patch) | |
tree | 4ab5fb408c4681340c48e7f91e4539a2a2318aa5 /library | |
parent | 37af6877cec98f828c177e32d0fa41b4a3d217fa (diff) | |
download | tk-5c754a2a7dbb6305a140012bd24f68e32b2375ff.zip tk-5c754a2a7dbb6305a140012bd24f68e32b2375ff.tar.gz tk-5c754a2a7dbb6305a140012bd24f68e32b2375ff.tar.bz2 |
Make the filebox demo prettier
Diffstat (limited to 'library')
-rw-r--r-- | library/demos/filebox.tcl | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/library/demos/filebox.tcl b/library/demos/filebox.tcl index 63c7d59..445052e 100644 --- a/library/demos/filebox.tcl +++ b/library/demos/filebox.tcl @@ -2,7 +2,7 @@ # # This demonstration script prompts the user to select a file. # -# RCS: @(#) $Id: filebox.tcl,v 1.10 2009/04/10 16:42:01 das Exp $ +# RCS: @(#) $Id: filebox.tcl,v 1.11 2010/01/04 12:11:48 patthoyts Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -17,7 +17,10 @@ wm title $w "File Selection Dialogs" wm iconname $w "filebox" positionWindow $w -label $w.msg -font $font -wraplength 4i -justify left -text "Enter a file name in the entry box or click on the \"Browse\" buttons to select a file name using the file selection dialog." +ttk::frame $w._bg +place $w._bg -x 0 -y 0 -relwidth 1 -relheight 1 + +ttk::label $w.msg -font $font -wraplength 4i -justify left -text "Enter a file name in the entry box or click on the \"Browse\" buttons to select a file name using the file selection dialog." pack $w.msg -side top ## See Code / Dismiss buttons @@ -25,10 +28,10 @@ set btns [addSeeDismiss $w.buttons $w] pack $btns -side bottom -fill x foreach i {open save} { - set f [frame $w.$i] - label $f.lab -text "Select a file to $i: " -anchor e - entry $f.ent -width 20 - button $f.but -text "Browse ..." -command "fileDialog $w $f.ent $i" + set f [ttk::frame $w.$i] + ttk::label $f.lab -text "Select a file to $i: " -anchor e + ttk::entry $f.ent -width 20 + ttk::button $f.but -text "Browse ..." -command "fileDialog $w $f.ent $i" pack $f.lab -side left pack $f.ent -side left -expand yes -fill x pack $f.but -side left @@ -36,7 +39,7 @@ foreach i {open save} { } if {[tk windowingsystem] eq "x11"} { - checkbutton $w.strict -text "Use Motif Style Dialog" \ + ttk::checkbutton $w.strict -text "Use Motif Style Dialog" \ -variable tk_strictMotif -onvalue 1 -offvalue 0 pack $w.strict -anchor c |