mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-25 22:31:10 +02:00
ideintf: introduce new method TObjectInspectorDlg.FocusGrid
git-svn-id: trunk@21810 -
This commit is contained in:
parent
5507b410fc
commit
6369c296cc
@ -703,6 +703,7 @@ type
|
||||
function GetActivePropertyRow: TOIPropertyGridRow;
|
||||
function GetCurRowDefaultValue(var DefaultStr: string): boolean;
|
||||
procedure HookRefreshPropertyValues;
|
||||
procedure FocusGrid;
|
||||
|
||||
property AutoShow: Boolean read FAutoShow write FAutoShow;
|
||||
property DefaultItemHeight: integer read FDefaultItemHeight
|
||||
@ -4855,6 +4856,21 @@ begin
|
||||
RefreshPropertyValues;
|
||||
end;
|
||||
|
||||
procedure TObjectInspectorDlg.FocusGrid;
|
||||
var
|
||||
Grid: TOICustomPropertyGrid;
|
||||
Index: Integer;
|
||||
begin
|
||||
Grid := GetActivePropertyGrid;
|
||||
if Grid <> nil then
|
||||
begin
|
||||
Index := Grid.ItemIndex;
|
||||
if Index < 0 then
|
||||
Index := 0;
|
||||
Grid.SetItemIndexAndFocus(Index);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TObjectInspectorDlg.GetGridControl(Page: TObjectInspectorPage
|
||||
): TOICustomPropertyGrid;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user