examples: addrbook: only show graph options

git-svn-id: trunk@40749 -
This commit is contained in:
mattias 2013-04-08 10:13:26 +00:00
parent 5a4ce26d88
commit 3621bd6a70
2 changed files with 13 additions and 2 deletions

View File

@ -28,6 +28,8 @@ object Form1: TForm1
Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper]
Indent = 13
NameFont.Color = clWindowText
OnEditorFilter = TIPropertyGrid1EditorFilter
TIObject = LvlGraphControl1
ValueFont.Color = clMaroon
end
end

View File

@ -6,7 +6,7 @@ interface
uses
Classes, SysUtils, FileUtil, RTTIGrids, Forms, Controls, Graphics,
Dialogs, ExtCtrls, LvlGraphCtrl;
Dialogs, ExtCtrls, LvlGraphCtrl, PropEdits, ObjectInspector;
type
@ -18,6 +18,8 @@ type
Splitter1: TSplitter;
TIPropertyGrid1: TTIPropertyGrid;
procedure FormCreate(Sender: TObject);
procedure TIPropertyGrid1EditorFilter(Sender: TObject;
aEditor: TPropertyEditor; var aShow: boolean);
private
public
end;
@ -49,8 +51,15 @@ begin
Graph.GetEdge('-Project-','OpenGLControl',true);
Graph.GetEdge('OpenGLControl','LCL',true);
end;
end;
TIPropertyGrid1.TIObject:=LvlGraphControl1;
procedure TForm1.TIPropertyGrid1EditorFilter(Sender: TObject;
aEditor: TPropertyEditor; var aShow: boolean);
var
PropName: String;
begin
PropName:=aEditor.GetName;
aShow:=(PropName='NodeStyle') or (PropName='EdgeStyle') or (PropName='Options');
end;
end.