mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 09:18:14 +02:00
ideintf: allow to search by first letter in the object inspector after pressing the Tab key (issue #0000901) by patch of Alexander S. Klenin
git-svn-id: trunk@19043 -
This commit is contained in:
parent
4e51b1e797
commit
46b1e4f932
@ -791,6 +791,7 @@ begin
|
|||||||
FFilter:=TypeFilter;
|
FFilter:=TypeFilter;
|
||||||
FItemIndex:=-1;
|
FItemIndex:=-1;
|
||||||
FStates:=[];
|
FStates:=[];
|
||||||
|
FColumn := oipgcValue;
|
||||||
FRows:=TFPList.Create;
|
FRows:=TFPList.Create;
|
||||||
FExpandingRow:=nil;
|
FExpandingRow:=nil;
|
||||||
FDragging:=false;
|
FDragging:=false;
|
||||||
@ -2058,6 +2059,21 @@ procedure TOICustomPropertyGrid.HandleStandardKeys(
|
|||||||
var
|
var
|
||||||
Handled: Boolean;
|
Handled: Boolean;
|
||||||
|
|
||||||
|
procedure FindPropertyByFirstLetter;
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
if Column = oipgcName then
|
||||||
|
for i := 0 to RowCount - 1 do
|
||||||
|
if (Rows[i].Lvl = Rows[ItemIndex].Lvl) and
|
||||||
|
(Ord(upCase(Rows[i].Name[1])) = Key) then
|
||||||
|
begin
|
||||||
|
SetItemIndexAndFocus(i);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
Handled := false;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure HandleUnshifted;
|
procedure HandleUnshifted;
|
||||||
const
|
const
|
||||||
Page = 20;
|
Page = 20;
|
||||||
@ -2080,6 +2096,8 @@ var
|
|||||||
|
|
||||||
VK_ESCAPE: RefreshValueEdit;
|
VK_ESCAPE: RefreshValueEdit;
|
||||||
|
|
||||||
|
Ord('A')..Ord('Z'): FindPropertyByFirstLetter;
|
||||||
|
|
||||||
else
|
else
|
||||||
Handled := false;
|
Handled := false;
|
||||||
end;
|
end;
|
||||||
@ -2088,7 +2106,7 @@ var
|
|||||||
begin
|
begin
|
||||||
//writeln('TOICustomPropertyGrid.HandleStandardKeys ',Key);
|
//writeln('TOICustomPropertyGrid.HandleStandardKeys ',Key);
|
||||||
Handled := false;
|
Handled := false;
|
||||||
if Shift = [] then
|
if (Shift = []) or (Shift = [ssShift]) then
|
||||||
begin
|
begin
|
||||||
if not (FCurrentEdit is TCustomCombobox) or
|
if not (FCurrentEdit is TCustomCombobox) or
|
||||||
not TCustomCombobox(FCurrentEdit).DroppedDown then
|
not TCustomCombobox(FCurrentEdit).DroppedDown then
|
||||||
@ -2120,7 +2138,8 @@ begin
|
|||||||
CanExpandRow(Rows[ItemIndex]);
|
CanExpandRow(Rows[ItemIndex]);
|
||||||
if Handled then ExpandRow(ItemIndex)
|
if Handled then ExpandRow(ItemIndex)
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
if not Handled and Assigned(OnOIKeyDown) then
|
if not Handled and Assigned(OnOIKeyDown) then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user