Hi,
I'm new to tcl/tk and I've started learning this language which I will be using it for my future project. I've been trying to output a file that involves entry field and tk_optionMenu field but I get a error saying use "cget or configure". Could some one guide me how to use cget or configure option in this situation.
Another question, How do I insert a same code multiple rows with the row number and column number increased or decreased.
Thanks a lot.
- Manjunatha
my code:
set de .default
frame $de
pack $de -side left
tk_optionMenu $de.metal w2 "M1 M2 M3 M4 M5"
entry $de.width -width 6 -relief sunken
grid $de.metal -row 0 -column 0
grid $de.width -row 0 -column 1
proc write {} {
set o1 [$de.metal get]
set o2 [$de.width get]
set file [open ./testing.txt]
puts $file "Metal is \"$o1\" and the Width is \"$o2\" "
close $file
}
I'm new to tcl/tk and I've started learning this language which I will be using it for my future project. I've been trying to output a file that involves entry field and tk_optionMenu field but I get a error saying use "cget or configure". Could some one guide me how to use cget or configure option in this situation.
Another question, How do I insert a same code multiple rows with the row number and column number increased or decreased.
Thanks a lot.
- Manjunatha
my code:
set de .default
frame $de
pack $de -side left
tk_optionMenu $de.metal w2 "M1 M2 M3 M4 M5"
entry $de.width -width 6 -relief sunken
grid $de.metal -row 0 -column 0
grid $de.width -row 0 -column 1
proc write {} {
set o1 [$de.metal get]
set o2 [$de.width get]
set file [open ./testing.txt]
puts $file "Metal is \"$o1\" and the Width is \"$o2\" "
close $file
}