Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tablelist and cell selection

35 views
Skip to first unread message

Nicolas

unread,
Jul 12, 2018, 3:09:31 AM7/12/18
to
Hi everybody, Csaba,

I have a tablelist with several rows and ttk::combobox in each.
the tablellist is configured with -selecttype cell -selectmode extended -editselectedonly 1

I would like to be able to select several cells, enter the edit mode of the first combobox (without visually loose selection), and apply the selected result to every selected cells.

but when I enter edit mode of the combobox, celle selection is lost....

is there's a trick or I must keep a track of all selected cells before entering cb edit mode?

many thanks,

allez les bleus :) (3-0)

Nicolas

nemethi

unread,
Jul 12, 2018, 7:05:34 AM7/12/18
to
In the procedure defined as the value of the -editstartcommand option
set the -exportselection option of the ttk::combobox to 0 (false).

--
Csaba Nemethi http://www.nemethi.de mailto:csaba....@t-online.de

Nicolas

unread,
Jul 12, 2018, 8:47:12 AM7/12/18
to
Hi Csaba,
thank you for your answer, I tried -exportselection and indeed, when I use the keyboard + Shift to select cells and press Enter to enter the edit mode, tble selection is not lost, cool.
but whenever ttk::combox is invoked with mouse click, selection in the tablelist is cleared and set to the cell containing the ttk::cb

is that possible?
(sure it is, but does it mens I have a not nice binding somewhere?)

++
Nicolas

nemethi

unread,
Jul 12, 2018, 10:31:55 AM7/12/18
to
The default bindings handle the <Button-1> event by first starting the
editing session for the clicked cell and then clearing the cell
selection and setting it to the cell just clicked. You can override
this standard behavior by inserting the following code into your
-editstartcommand procedure:

set cellIdxList [$tbl curcellselection]
after 0 [list $tbl cellselection set $cellIdxList]

Nicolas

unread,
Jul 12, 2018, 10:39:23 AM7/12/18
to
very very nice !! :)
mille mercis Csaba

++
0 new messages