I have some virtual controls which is a part of a designer system i have made. They mimic delphi's own components, except that they are fully owner-drawn. The problem I am faced with is that, since my property system is somewhat different from ordinary Delphi - I cant use an RTTI inspector to edit the properties.
Does anyone know about a inspector that looks and acts like the normal delphi inspector, but that allows me to define the properties by code?
And if possible, one which allows me to define enums:
with edInspector.Items.add('align') do
Begin
Options.add('alLeft',ftord(TMyAlign.azLeft));
Options.add('alTop',ord(TMyAlign.azTop));
Options.add('alRight',ord(TMyAlign.azRight));
Options.add('alBottom',ord(TMyAlign.azBottom));
Options.add('alClient',ord(TMyAlign.azClient));
end;
and complex types:
with edInspector.Items.add('font') do
Begin
subitems.add('name',dtString).value:=def_FontName;
subitems.add('size',dtInteger).value:=def_fontSize;
subitems.add('color',dtColor).Value:=def_fontColor;
end;
Give Inspex a try. It's pretty cool.
http://www.raize.com/DevTools/Inspex/Default.asp
You can add properties dynamically, and you'll get property editors for most of the common types.
It can behave pretty much like the Delphi object inspector (it lets you edit sets, if you add multiple objects, it detects which properties are the same, and hides the others, and it does the same for property values).
It shows properties in a tree-like structure if there are multiple levels. You can easily populate it by adding any TObject, via a string, or by adding the properties one by one.
Screenshot:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With