[lazarus] CustomFormEditor

Florian Klaempfl florian at klaempfl.de
Sun Nov 19 06:05:08 EST 2000


At 21:10 18.11.00 -0600, you wrote:
>OK, I added more code for the customformeditor.  I added some code in 
>customformeditor.pp for the class TComponentInterface.  The problem is I 
>don't know what the hell I am doing when it comes to getting typeinfo and 
>calling GetPropInfo or stuff like that.

The typeinfo unit is used to set/get published properties of classes at run 
time without
knowing the class declaration. This is quite difficult to do. To get an 
idea how it works,
have a look at the file tests\test\testrtti.pp in the tests repository of FPC.


>Can anyone help me?  The TComponentInterface has functions like 
>GetPropvaluebyname but I'm not sure how to go about doing that.

The idea is that you can get the name of all published properties of a
class via typinfo.GetPropList. With typinfo.GetPropInfo you can ask for 
more information about
a property by it's name and then you can use the Get*Prop/Set*Prop funtions to
set/get the value of a property of a particular class instance.

I guess the GetPropValueByName funtions has to enculapse this procedure.

Hope this helps a little bit ...
If you need more help, feel free to ask. BTW: I propose that this info is 
stored for future
use because I think I explained this already some months ago. But I agree 
it's quite difficult.






More information about the Lazarus mailing list