TzObjectInspector Github上的一个开源组件!可以做到类似Delphi IDE属性,事件面板的样式!作者持续更新中...
看起来是这个样子:
这个东西用起来并不像想象的那样可以直接添加数据,反而类似mvc规范,需要将需要的数据定义为类,然后用它读入,改变!
例如先定义个类:
type
TEmnu=(red,blue,yellow);
//进程动作列表
type TProcessAction=class(TObject)
private
FindProcess :Boolean;
StartProcess:Boolean;
CloseProcess:Boolean;
FGridColor:TEmnu;
published
property 查找进程:Boolean read FindProcess write FindProcess default true;
property 启动进程:Boolean read StartProcess write StartProcess;
property 关闭进程:Boolean read CloseProcess write CloseProcess;
property 颜色选择:TEmnu read FGridColor write FGridColor;
end;
然后写入代码:
procedure TForm.Button1Click(Sender: TObject);
var
ProcessAction:TProcessAction;
begin
ProcessAction:=TProcessAction.Create;
Zoi.Component:=ProcessAction;
end;
然后看起来是这个样子:
结束..