mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 10:59:29 +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/ideoptionsintf.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/projectintf.xml 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
|
||||
): boolean of object;
|
||||
|
||||
TOIEditorFilterEvent = procedure(Sender: TObject; aEditor: TPropertyEditor;
|
||||
var aShow: boolean) of object;
|
||||
|
||||
TOICustomPropertyGrid = class(TCustomControl)
|
||||
private
|
||||
FBackgroundColor: TColor;
|
||||
@ -260,6 +263,7 @@ type
|
||||
FGutterEdgeColor: TColor;
|
||||
FHighlightColor: TColor;
|
||||
FLayout: TOILayout;
|
||||
FOnEditorFilter: TOIEditorFilterEvent;
|
||||
FOnOIKeyDown: TKeyEvent;
|
||||
FOnPropertyHint: TOIPropertyHint;
|
||||
FOnSelectionChange: TNotifyEvent;
|
||||
@ -481,6 +485,7 @@ type
|
||||
property Indent: integer read FIndent write FIndent;
|
||||
property ItemIndex: integer read FItemIndex write SetItemIndex;
|
||||
property Layout: TOILayout read FLayout write FLayout default oilHorizontal;
|
||||
property OnEditorFilter: TOIEditorFilterEvent read FOnEditorFilter write FOnEditorFilter;
|
||||
property OnModified: TNotifyEvent read FOnModified write FOnModified;
|
||||
property OnOIKeyDown: TKeyEvent read FOnOIKeyDown write FOnOIKeyDown;
|
||||
property OnSelectionChange: TNotifyEvent read FOnSelectionChange write FOnSelectionChange;
|
||||
@ -2281,6 +2286,8 @@ function TOICustomPropertyGrid.EditorFilter(
|
||||
const AEditor: TPropertyEditor): Boolean;
|
||||
begin
|
||||
Result := IsInteresting(AEditor, FFilter);
|
||||
if Result and Assigned(OnEditorFilter) then
|
||||
OnEditorFilter(Self,AEditor,Result);
|
||||
end;
|
||||
|
||||
procedure TOICustomPropertyGrid.EraseBackground(DC: HDC);
|
||||
@ -3107,7 +3114,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOICustomPropertyGrid.HintTimer(sender : TObject);
|
||||
procedure TOICustomPropertyGrid.HintTimer(Sender: TObject);
|
||||
var
|
||||
HintRect : TRect;
|
||||
AHint : String;
|
||||
@ -3173,7 +3180,7 @@ begin
|
||||
FHintWindow.ActivateHint(HintRect, AHint);
|
||||
end;
|
||||
|
||||
Procedure TOICustomPropertyGrid.ResetHintTimer;
|
||||
procedure TOICustomPropertyGrid.ResetHintTimer;
|
||||
begin
|
||||
if FHintWindow = nil then exit;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user