HMcG
HMcG

Reputation: 2060

How do I make the Object Inspector show more TColor property values?

The IDE Object Inspector shows TColor properties with a drop-down ColorBox, and the color can be selected by name - clBlack etc, as defined in the Graphics unit. The problem is that the clWeb colors also defined in the Graphics unit are not present, and any custom colors I define are also not there.

So how do I extend the defined colors that are selectable in the Object Inspector?

PS Delphi XE

Upvotes: 6

Views: 2431

Answers (1)

Uli Gerhardt
Uli Gerhardt

Reputation: 14001

I would try to derive a class from TColorProperty (unit VCLEditors) and override GetValue/GetValues/SetValue. See here for a detailed discussion.

Edit: My original link is broken by now. Try the thread Custom colors in Delphi 7 (in borland.public.delphi.vcl.components.writing.general) instead.

Upvotes: 1

Related Questions