0
votes

I am creating a component that uses a collection and collection items of panels.

I can't seem to get the colors to work at runtime, but yet they seem to work just fine at design time.

You can download the component source code here:

http://www.shaneholmes.net/pasfiles/

There is a Consoles (Tcollection) property, status colors property, and a Edit mode property

Each console (TCollectionItem) has a status property when changed, the consoles property is changed based on the components StatusColors property.

When the components EditMode property is set to true, you can move the panels around at runtime.

Question: Why does the colors only work at designtime and not runtime.

thanks

1
Can you write a little test project to show the problem? Preferrably one that doesn't require iinstalling your component - shouldn't matter as the problem occurs at runtime.Uli Gerhardt

1 Answers

1
votes

I haven't looked at your code, but "panels" + "colors not working" sounds as if you've forgotten to set ParentBackground to False.

I guess that the colors probably work at design-time, because you enabled theming by using XPMan and not by checking the "Enable run-time themes" checkbox in the project options. (The second option is only available to you, if you have D2007 or later.)