mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 11:19:59 +02:00
IDEIntf: added TOICustomPropertyGrid.OnEditorFilter
git-svn-id: trunk@40747 -
This commit is contained in:
parent
1531418952
commit
eba7a492a5
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -5126,6 +5126,7 @@ ideintf/docs/idecommands.xml svneol=native#text/plain
|
|||||||
ideintf/docs/ideimagesintf.xml svneol=native#text/plain
|
ideintf/docs/ideimagesintf.xml svneol=native#text/plain
|
||||||
ideintf/docs/ideoptionsintf.xml svneol=native#text/plain
|
ideintf/docs/ideoptionsintf.xml svneol=native#text/plain
|
||||||
ideintf/docs/lazideintf.xml svneol=native#text/plain
|
ideintf/docs/lazideintf.xml svneol=native#text/plain
|
||||||
|
ideintf/docs/objectinspector.xml svneol=native#text/plain
|
||||||
ideintf/docs/packageintf.xml svneol=native#text/plain
|
ideintf/docs/packageintf.xml svneol=native#text/plain
|
||||||
ideintf/docs/projectintf.xml svneol=native#text/plain
|
ideintf/docs/projectintf.xml svneol=native#text/plain
|
||||||
ideintf/fieldseditor.lfm svneol=native#text/plain
|
ideintf/fieldseditor.lfm svneol=native#text/plain
|
||||||
|
10
ideintf/docs/objectinspector.xml
Normal file
10
ideintf/docs/objectinspector.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<fpdoc-descriptions><package name="IDEIntf"><module name="ObjectInspector"><element name="TOICustomPropertyGrid.OnEditorFilter"><short>Event for filtering root properties</short><descr>Set <var>aShow</var> to <b>false</b> to not show property.
|
||||||
|
For example:
|
||||||
|
<p><code>if aEditor.GetName='Visible' then aShow:=false;</code>
|
||||||
|
</p>
|
||||||
|
</descr>
|
||||||
|
</element>
|
||||||
|
</module>
|
||||||
|
</package>
|
||||||
|
</fpdoc-descriptions>
|
@ -252,6 +252,9 @@ type
|
|||||||
out HintWinRect: TRect; out AHint: string
|
out HintWinRect: TRect; out AHint: string
|
||||||
): boolean of object;
|
): boolean of object;
|
||||||
|
|
||||||
|
TOIEditorFilterEvent = procedure(Sender: TObject; aEditor: TPropertyEditor;
|
||||||
|
var aShow: boolean) of object;
|
||||||
|
|
||||||
TOICustomPropertyGrid = class(TCustomControl)
|
TOICustomPropertyGrid = class(TCustomControl)
|
||||||
private
|
private
|
||||||
FBackgroundColor: TColor;
|
FBackgroundColor: TColor;
|
||||||
@ -260,6 +263,7 @@ type
|
|||||||
FGutterEdgeColor: TColor;
|
FGutterEdgeColor: TColor;
|
||||||
FHighlightColor: TColor;
|
FHighlightColor: TColor;
|
||||||
FLayout: TOILayout;
|
FLayout: TOILayout;
|
||||||
|
FOnEditorFilter: TOIEditorFilterEvent;
|
||||||
FOnOIKeyDown: TKeyEvent;
|
FOnOIKeyDown: TKeyEvent;
|
||||||
FOnPropertyHint: TOIPropertyHint;
|
FOnPropertyHint: TOIPropertyHint;
|
||||||
FOnSelectionChange: TNotifyEvent;
|
FOnSelectionChange: TNotifyEvent;
|
||||||
@ -481,6 +485,7 @@ type
|
|||||||
property Indent: integer read FIndent write FIndent;
|
property Indent: integer read FIndent write FIndent;
|
||||||
property ItemIndex: integer read FItemIndex write SetItemIndex;
|
property ItemIndex: integer read FItemIndex write SetItemIndex;
|
||||||
property Layout: TOILayout read FLayout write FLayout default oilHorizontal;
|
property Layout: TOILayout read FLayout write FLayout default oilHorizontal;
|
||||||
|
property OnEditorFilter: TOIEditorFilterEvent read FOnEditorFilter write FOnEditorFilter;
|
||||||
property OnModified: TNotifyEvent read FOnModified write FOnModified;
|
property OnModified: TNotifyEvent read FOnModified write FOnModified;
|
||||||
property OnOIKeyDown: TKeyEvent read FOnOIKeyDown write FOnOIKeyDown;
|
property OnOIKeyDown: TKeyEvent read FOnOIKeyDown write FOnOIKeyDown;
|
||||||
property OnSelectionChange: TNotifyEvent read FOnSelectionChange write FOnSelectionChange;
|
property OnSelectionChange: TNotifyEvent read FOnSelectionChange write FOnSelectionChange;
|
||||||
@ -2281,6 +2286,8 @@ function TOICustomPropertyGrid.EditorFilter(
|
|||||||
const AEditor: TPropertyEditor): Boolean;
|
const AEditor: TPropertyEditor): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := IsInteresting(AEditor, FFilter);
|
Result := IsInteresting(AEditor, FFilter);
|
||||||
|
if Result and Assigned(OnEditorFilter) then
|
||||||
|
OnEditorFilter(Self,AEditor,Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOICustomPropertyGrid.EraseBackground(DC: HDC);
|
procedure TOICustomPropertyGrid.EraseBackground(DC: HDC);
|
||||||
@ -3107,7 +3114,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOICustomPropertyGrid.HintTimer(sender : TObject);
|
procedure TOICustomPropertyGrid.HintTimer(Sender: TObject);
|
||||||
var
|
var
|
||||||
HintRect : TRect;
|
HintRect : TRect;
|
||||||
AHint : String;
|
AHint : String;
|
||||||
@ -3173,7 +3180,7 @@ begin
|
|||||||
FHintWindow.ActivateHint(HintRect, AHint);
|
FHintWindow.ActivateHint(HintRect, AHint);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure TOICustomPropertyGrid.ResetHintTimer;
|
procedure TOICustomPropertyGrid.ResetHintTimer;
|
||||||
begin
|
begin
|
||||||
if FHintWindow = nil then exit;
|
if FHintWindow = nil then exit;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user