Hello LMD team,
there isn't a single thing in the LMD Elpack library that causes me more headaches and frustration than "transparency" and "theming". I just don't understand how this is supposed to work at all. It is chaos. Every time I think I understand it, it turns out I was wrong. It is really getting to my nerves.
Performing something as dead simple as putting a tElPanel on a form, give it a pale yellow color ($00E0F7F7) and place some tElLabel and tElHtmlLabel components on it is so hard that it's almost unbelievable.
There are some properties (thememode, themeglobalmode, transparent, transparentXPThemes, parentcolor) and I completely fail to grasp how these properties interact.
- When I set the "color" of the panel, the property "takes" but the color does not change. That is bad. Either "take" the color or refuse it, but don't pretend!
Yet when I set the panel's "transparentXPThemes" to false - it suddenly works. Why the heck is that ?
And when I set the panel's "transparentXPThemes" back to its original value and Thememode to ttmNone, it also works. But... if I then put a tElLabel on it (having property "transparent=true"), the label has the wrong background color (clbtnface instead of pale yellow)... So why isn't the label "transparent" when I tell it to ? The label also has "parentcolor=true" by default, but then again, why does it not have its parent's color ?
What I want to achieve is very simple. Put a tElPanel with some color or texture on a form and put some other Elpack components on top of it. But somehow I have to move heaven and earth in every component just to make the color of the background panel shine through.
Delphi's standard components have NONE of these issues. I use Delphi 2009 and my application has a manifest to indicate it supports theming (which works fine for the original vcl components). So far, my best solution has been to set "thememode=ttmNone" everywhere...