3

How can I configure a virtual tree view to edit the next column when user presses TAB?

+--------+-----------+
+ |1     + |2        +
+--------+-----------+
+        +           +
+--------+-----------+

Default behaviour is editing the next node/row:

+--------+-----------+
+ |1     +           +
+--------+-----------+
+ |2     +           +
+--------+-----------+
jpfollenius
  • 16,456
  • 10
  • 90
  • 156
  • 1
    If you're using the default editor of the `TVirtualStringTree` class, then the editor is implemented by the `TVTEdit` class. That class handles the `WM_KEYDOWN` message, which has for the `VK_TAB` virtual key hardcoded switching to the next node without considering columns. As the easiest solution I would suggest you to implement your own editor through the `IVTEditLink` interface. – TLama Jul 02 '13 at 13:03
  • 1
    Since editable columns / grid mode are not considered, this seems to be a bug to me. You should consider opening an issue at http://code.google.com/p/virtual-treeview/. If you can provide a patch, I will be happy to include it in the next release. – Joachim Marder Jul 02 '13 at 15:48

1 Answers1

1

I would suggest setting up the 'OnKeyPress' event and then manually directing the selected item in the treeview to the desired next item.

James_Hill
  • 167
  • 1
  • 4
  • 13