Re: Help Regarding GUI



On Oct 12, 11:19 am, raaki <hemanth...@xxxxxxxxx> wrote:
Hi friends

i am newbie toTcl/Tk .i need some help regarding GUI design with tcl/
tk.i want to design a gui with a List of 5 fields and display it with
default values and intial dir, and when running the script the gui is
displayed such that i can edit (mean a browse option to change files
or direct).

i wrote a script with an array such that i am able to create the GUI
with the required fields and also with browse option,but when i browse
only the fifth label is getting updated .i dont know what error is
behind,can u guys help me to find the error

set listOfFields [list ABSOLUTE_PATH_NAMES ANNOTATE_LOAD_SLEW
BA_DIR BLACKBOXES SUB ]
foreach field $listOfFields {
set f ".frame-$field"
frame $f
button $f.label -width 30 -text "$field:" -bg NavajoWhite2 -fg Navy
-relief raised -command daa
label $f.entry -textvariable data($field) -relief sunken -bg
NavajoWhite -fg Navy -anchor nw
pack $f.label -side left
pack $f.entry -side left -fill x -expand 1
bind $f.entry <Return> [list validate_field $field.]
pack $f -side top -fill x

}

proc daa {} {
global data
global initialdir
set data($field) [tk_chooseDirectory -initialdir ~ -title "choose
directory"]

}

please also help me how to fit a scrollbar in the GUI which it
displays when running the script

Regards
raaki

change the button command to ..-command [list daa $field]
and set the arguments of proc daa to "proc daa {field} {...}
for a scrollbar introduction see http://wiki.tcl.tk/11211
fr

.