- assigned_to: nobody --> hobbs
- summary: tktable: cut n paste in "extende --> tktable: cut n paste in "extende
Hello,
I am having trouble using the Ctrl-C and Ctrl-V commands on win2k to
copy and paste an entire column in tktable widget. To replicate this
problem:
1. Invoke the basic.tcl demo that comes with tktable.
2. Click on the title row of first column (r-1,c0) in the demo. This
will select the entire first column.
3. Press Ctrl-C to copy the contents of the column into clipboard.
4. Now, click on the title row of 2nd column (r-1,c1). It should select
the entire 2nd column.
5. Paste the clipborad contents into the selected column by pressing
Ctrl-V.
Note that this process copies the cell {r0,c0} into {r-1,c1}, {r1,c0}
into {r0,c1}, and so on and that {r6,c1} is untouched. This is not the
expected behavior as the copied contents are skewed by one row.
On further looking into tkTable.tcl file, I found out that the problem
occurs because it is not possible to set a selection on title rows or
columns. For example, even when I explicitly select the entire column
for basic.tcl example, it only selects row 0 through 6:
(Tktable) 3 % .t selection set -1,0 6,0
(Tktable) 4 % .t curselection
0,0 1,0 2,0 3,0 4,0 5,0 6,0 6,4
At first I thought, cells which are in "disabled" state cannot be
selected. But I verified that this is not true -- non-title cells which
have been disabled do get selected. So, is there any reason why cells
having title tag cannot be selected?
If this behavior cannot be changed, then the proc tk_tablePasteHandler
may have to be modified to handle the cut and paste problem correctly.
Hemang.
-------------------------------------------------------------------
Hemang Lavana wrote:
...
> At first I thought, cells which are in "disabled" state cannot be
> selected. But I verified that this is not true -- non-title cells which
> have been disabled do get selected. So, is there any reason why cells
> having title tag cannot be selected?
>
> If this behavior cannot be changed, then the proc tk_tablePasteHandler
> may have to be modified to handle the cut and paste problem correctly.
The way selection and titles worked was always odd (inherited
behavior from the original tktable widget of long ago). I
should have changed it before, but ... I'll look into this
again next week (I'm working from afar this week). Please
submit this to the tktable bug list, as I would classify it
as such.
--
Jeff Hobbs