eric Guest
|
Posted: Mon Oct 16, 2006 11:40 pm Post subject: VirtualTree OnEditing event's column value oddities |
|
|
I posted this on the the VirtualTree homepage forum as well as here.
----
I have a VT with 9 columns (0..8 ). I want to be able to have an
editor TComboBox in columns 1 and 2.
I have the following TreeOptions set:
[toAutoDropExpand,toAutoScrollOnExpand,toAutoTristateTracking,toAutoDeleteMovedNodes]
[toAcceptOLEDrop,toEditable,toFullRepaintOnResize,toInitOnSave,toToggleOnDblClick,toWheelPanning]
[toShowBackground,toShowButtons,toShowDropmark,toShowRoot,toShowTreeLines,toShowVertGridLines,toThemeAware,toUseBlendedImages,toStaticBackground]
[toExtendedFocus,toFullRowSelect]
[toSaveCaptions,toAutoAcceptEditChange]
I have the OnEditing event handler's allowed set to:
((Column = 1) or (Column=2))
I have four rows of data, each being a child of the rootnode.
The column value of the OnEditing event is not correct. If I
click on the text in the first column, the OnEditing event fires
with column=1 (instead of 0) and the editor pops up in column 1
as if I click in column 1.
If I click in column 1, it correctly creates the combo box for
that column.
If I click on column 2 of a different row from the current row,
it again calls Onediting with column 1. If I click on column 2 a
second time, (same row), then I will get the column=2 in the
onediting event handler and the combo box opens correctly for
column 2.
If I click in columns 3 through 8 of a row that is not the
current row, the onediting event gets called with column 1. If I
click on a selected row one, two, or three times, I do not get an
onEditing event. On the fourth click, it will cause the onediting
event with the correct column number.
Any ideas on what the issue is and how I can correct this?
Thanks,
Eric |
|