|
Hi,
I want to set the active cell in tixGrid without using the mouse.
I wrote the following code :
proc editnotify { x y } {
return 1;
}
set grid [tixGrid .grid -selectmode multiple \
-editnotifycmd editnotify ]
#Setting anchor and selectmode as suggested in bug posting
$grid anchor set 0 0
#This line causes the error
$grid edit set 1 1
pack $grid
I get an error :
Error in startup script: bad screen distance ""
while executing
"place $w -x $x -y $y -width $width -height $height -bordermode
ignore"
(procedure "tixFloatEntry:post" line 11)
invoked from within
"tixFloatEntry:post .grid.tixpriv__edit {} {} {} {}"
invoked from within
"$edit post $x $y $W $H"
(procedure "tixGrid:SetEdit" line 41)
invoked from within
"tixGrid:SetEdit $w [list $x $y]"
("0" arm line 2)
invoked from within
"case [tixGrid:GetState $w] {
{0} {
tixGrid:SetEdit $w [list $x $y]
}
default {
lappend $list [list tixGrid:SetEdit $w [list $x $y]..."
(procedure "tixGrid:EditCell" line 5)
invoked from within
"tixGrid:EditCell .grid 1 1"
invoked from within
"$grid edit set 1 1 "
(file "./try.tcl" line 48)
I went to tix.sourceforge.net and I found that this is a bug
in the tixGrid widget.
Going into the source code i.e. Grid.tcl, I traced the call-stack
and found that the [winfo reqheight $w] and [winfo reqwidth $w]
supplying the $W and $H seem to be returning nothing as shown
in the error message for 'place' command.
I am using tix 8.2.0b1-65,tcl 8.3,tk 8.3 on a
Red-HatLinux 7.2 Enigma
Does anyone know of a workaround. I don't want to have to keep
selecting each entry with the mouse, just hit Return and move to the
next cell to the right.
Thanks,
Gurudutt.
|