Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Change background color of TLMDPropertyInspector

I want to change the 'unused background' color of a TLMDPropertyInspector, but I can't find a property that works. I can change all other colors, but NOT the white section at the bottom. Any ideas?



  • 5 Comments sorted by Votes Date Added
  • Hi,

    Currently there no way to change this color. This is due to the fact that property inspector descends from TCustomGrid, and this area is filled inside base class code.

    I'm myself looked several times at this problem, and found no way to override this behavior.
  • Well, there *is* a way, but it involves a minor tweak to the code ;-)

    Promote TCustomGrid's 'DrawingStyle' property from 'protected' to 'public' in TLMDCustomPropsPage  or somewhere similar, and then set it to gdsClassic

    The 'Color' property now affects the background color of the entire control, rather than just the active area. Surprisingly, nothing else seemed to change. I was hoping to be able to set a different background for the inactive vs. active areas, but maybe some custom cell drawing code could do that?
  • edited December 2013 Posts: 52Vote Up0Vote Down
    Here's an alternative to switching DrawingStyle, which does what I require: Publish a new TColor property called BaseColor, and in the "DrawCell" method of TLMDCustomPropsPage, add

      FInternalColor := BaseColor;

  • Hi,

    Thanks for your reports, I'll look what can be done.
Sign In or Register to comment.