designer: focus object inspector grid on pressing Enter key

git-svn-id: trunk@21811 -
This commit is contained in:
paul 2009-09-22 01:11:25 +00:00
parent 6369c296cc
commit 06befbadc9
3 changed files with 26 additions and 1 deletions

View File

@ -92,6 +92,7 @@ type
FMediator: TDesignerMediator;
FOnActivated: TNotifyEvent;
FOnCloseQuery: TNotifyEvent;
FOnShowObjectInspector: TNotifyEvent;
FOnPersistentDeleted: TOnPersistentDeleted;
FOnGetNonVisualCompIcon: TOnGetNonVisualCompIcon;
FOnGetSelectedComponentClass: TOnGetSelectedComponentClass;
@ -183,6 +184,7 @@ type
PasteFlags: TComponentPasteSelectionFlags): Boolean;
procedure DoShowTabOrderEditor;
procedure DoShowChangeClassDialog;
procedure DoShowObjectInspector;
procedure DoOrderMoveSelectionToFront;
procedure DoOrderMoveSelectionToBack;
procedure DoOrderForwardSelectionOne;
@ -322,6 +324,7 @@ type
read FOnShowOptions write FOnShowOptions;
property OnViewLFM: TNotifyEvent read FOnViewLFM write FOnViewLFM;
property OnSaveAsXML: TNotifyEvent read FOnSaveAsXML write FOnSaveAsXML;
property OnShowObjectInspector: TNotifyEvent read FOnShowObjectInspector write FOnShowObjectInspector;
property ShowGrid: boolean read GetShowGrid write SetShowGrid;
property ShowBorderSpacing: boolean read GetShowBorderSpacing write SetShowBorderSpacing;
property ShowEditorHints: boolean
@ -1147,6 +1150,12 @@ begin
ShowChangeClassDialog(Self,ControlSelection[0].Persistent);
end;
procedure TDesigner.DoShowObjectInspector;
begin
if Assigned(FOnShowObjectInspector) then
OnShowObjectInspector(Self);
end;
procedure TDesigner.DoOrderMoveSelectionToFront;
begin
if ControlSelection.Count <> 1 then Exit;
@ -2199,6 +2208,12 @@ begin
else
Handled := False;
VK_RETURN:
if Shift = [] then
DoShowObjectInspector
else
Handled := False;
VK_A:
if Shift = [ssCtrl] then
DoSelectAll

View File

@ -1,7 +1,7 @@
{
*****************************************************************************
* *
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
* for details about the copyright. *
* *
* This program is distributed in the hope that it will be useful, *

View File

@ -454,6 +454,7 @@ type
AComponent: TComponent; const NewName: string);
procedure OnDesignerViewLFM(Sender: TObject);
procedure OnDesignerSaveAsXML(Sender: TObject);
procedure OnDesignerShowObjectInspector(Sender: TObject);
// control selection
procedure OnControlSelectionChanged(Sender: TObject; ForceUpdate: Boolean);
@ -3161,6 +3162,7 @@ begin
OnComponentAdded:=@OnDesignerComponentAdded;
OnViewLFM:=@OnDesignerViewLFM;
OnSaveAsXML:=@OnDesignerSaveAsXML;
OnShowObjectInspector:=@OnDesignerShowObjectInspector;
ShowEditorHints:=EnvironmentOptions.ShowEditorHints;
ShowComponentCaptions := EnvironmentOptions.ShowComponentCaptions;
end;
@ -11220,9 +11222,12 @@ end;
procedure TMainIDE.DoBringToFrontFormOrInspector(ForceInspector: boolean);
procedure ShowInspector;
var
Control: TWinControl;
begin
if ObjectInspector1=nil then exit;
ObjectInspector1.ShowOnTop;
ObjectInspector1.FocusGrid;
if FDisplayState <> high(TDisplayState) then
FDisplayState:= Succ(FDisplayState);
end;
@ -13968,6 +13973,11 @@ begin
end;
end;
procedure TMainIDE.OnDesignerShowObjectInspector(Sender: TObject);
begin
DoBringToFrontFormOrInspector(True);
end;
Procedure TMainIDE.OnSrcNoteBookAddJumpPoint(ACaretXY: TPoint;
ATopLine: integer; APageIndex: integer; DeleteForwardHistory: boolean);
{off $DEFINE VerboseJumpHistory}