Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

tablelist and cell selection

瀏覽次數:35 次
跳到第一則未讀訊息

Nicolas

未讀,
2018年7月12日 凌晨3:09:312018/7/12
收件者:
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

未讀,
2018年7月12日 清晨7:05:342018/7/12
收件者:
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

未讀,
2018年7月12日 上午8:47:122018/7/12
收件者:
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

未讀,
2018年7月12日 上午10:31:552018/7/12
收件者:
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

未讀,
2018年7月12日 上午10:39:232018/7/12
收件者:
very very nice !! :)
mille mercis Csaba

++
0 則新訊息