Felipe
Felipe

Reputation: 283

Category of a component

I would like to know if it is possible to know the category of a component at run time. For example, if I have a TLabel it is category is Standard, this means that the component TLabel is in the Standard Tool Palette.

I need that to check if the component is one of my own creations, because I have a lot of new components and I don't want to check with a lots of ifs conditions...

thanks

Upvotes: 0

Views: 106

Answers (1)

Uwe Raabe
Uwe Raabe

Reputation: 47704

The category where the component is installed into the tool palette is determined by the call to RegisterComponent, which itself usually is part of a Register procedure. This Register procedure is called from the IDE when it installs a design time package.

In short: there is little hope that you can find out the category at runtime as it is not bound to the component itself. Instead it is more some information for the IDE and thus only handled there.

Upvotes: 5

Related Questions