ProjectGroups: Ctrl+Up/Down in tree view moves the project Up/Down

git-svn-id: trunk@62242 -
This commit is contained in:
ondrej 2019-11-15 20:23:11 +00:00
parent b90f3e6b36
commit 2a70f42a1b
2 changed files with 21 additions and 1 deletions

View File

@ -104,6 +104,7 @@ object ProjectGroupEditorForm: TProjectGroupEditorForm
TabOrder = 1
OnAdvancedCustomDrawItem = TVPGAdvancedCustomDrawItem
OnDblClick = TVPGDblClick
OnKeyDown = TVPGKeyDown
OnMouseDown = TVPGMouseDown
OnSelectionChanged = TVPGSelectionChanged
Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoRightClickSelect, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]

View File

@ -17,7 +17,7 @@ uses
Classes, SysUtils,
// LCL
Forms, Controls, Graphics, Dialogs, ComCtrls, Menus,
ActnList, LCLProc, Clipbrd, ImgList,
ActnList, LCLProc, Clipbrd, ImgList, LCLType,
// LazUtils
LazFileUtils, LazLoggerBase, LazFileCache,
// IdeIntf
@ -163,6 +163,7 @@ type
Node: TTreeNode; {%H-}State: TCustomDrawState; Stage: TCustomDrawStage;
var {%H-}PaintImages, {%H-}DefaultDraw: Boolean);
procedure TVPGDblClick(Sender: TObject);
procedure TVPGKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure TVPGMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure TVPGSelectionChanged(Sender: TObject);
@ -745,6 +746,24 @@ begin
end;
end;
procedure TProjectGroupEditorForm.TVPGKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Shift=[ssCtrl] then
case Key of
VK_UP:
begin
TBTargetUp.Click;
Key := 0;
end;
VK_DOWN:
begin
TBTargetLater.Click;
Key := 0;
end;
end;
end;
procedure TProjectGroupEditorForm.TVPGMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var