I think this change was meant in issue #1136 - makes the index tree editable by clicking the cells, just like the columns list.

This commit is contained in:
Ansgar Becker
2009-05-22 22:31:55 +00:00
parent 61693a8fcc
commit c2fc155a7b
2 changed files with 17 additions and 0 deletions

View File

@@ -438,6 +438,7 @@ object frmTableEditor: TfrmTableEditor
TreeOptions.PaintOptions = [toHotTrack, toShowButtons, toShowDropmark, toShowRoot, toShowTreeLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toFullVertGridLines, toUseExplorerTheme, toHideTreeLinesIfThemed]
TreeOptions.SelectionOptions = [toExtendedFocus, toRightClickSelect]
OnBeforePaint = treeIndexesBeforePaint
OnClick = treeIndexesClick
OnCreateEditor = treeIndexesCreateEditor
OnDragOver = treeIndexesDragOver
OnDragDrop = treeIndexesDragDrop

View File

@@ -129,6 +129,7 @@ type
procedure menuAddIndexColumnClick(Sender: TObject);
procedure PageControlMainChange(Sender: TObject);
procedure chkCharsetConvertClick(Sender: TObject);
procedure treeIndexesClick(Sender: TObject);
private
{ Private declarations }
FModified: Boolean;
@@ -1257,6 +1258,21 @@ begin
end;
procedure TfrmTableEditor.treeIndexesClick(Sender: TObject);
var
VT: TVirtualStringTree;
Node: PVirtualNode;
begin
// Handle click event
VT := Sender as TVirtualStringTree;
if not Assigned(VT.FocusedNode) then
Exit;
Node := VT.GetNodeAt(Mouse.CursorPos.X-VT.ClientOrigin.X, Mouse.CursorPos.Y-VT.ClientOrigin.Y);
if Assigned(Node) then
VT.EditNode(Node, VT.FocusedColumn);
end;
procedure TfrmTableEditor.ValidateIndexControls;
var
Node: PVirtualNode;