ideintf: introduce new method TObjectInspectorDlg.FocusGrid

git-svn-id: trunk@21810 -
This commit is contained in:
paul 2009-09-22 01:10:32 +00:00
parent 5507b410fc
commit 6369c296cc

View File

@ -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