Link to home
Start Free TrialLog in
Avatar of chmod101
chmod101

asked on

Adding component selection to your created component's object inspector

I am creating a component, and one of the published properities (to show up in the object inspector) needs to be a drop-down selection box that is populated with all of the TTable components on the current form.  I tried looking at the .pas files for some of the standard VCL components that do this, but I couldnt follow all of the code.

Any thoughts  on how to do this?
chmod101
Avatar of kretzschmar
kretzschmar
Flag of Germany image

marker for coming back later . . .
Normally you don't have to do anything for that.

TComponentProperty does all that for you.

The property must be in the published section of the component.

Regards Jacco

(I am verifying this at the moment)
ASKER CERTIFIED SOLUTION
Avatar of Jacco
Jacco
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yep, i thought this,
but didn't had the time for a check
Avatar of chmod101
chmod101

ASKER

Thanks Jacco,

I haven't done anything  like this before, so I didn't know that you could just declare the property as a TTable property, and that Delphi would automatically populate a listing of all TTables available.

Thanks for the help.
chmod101