LMD VCL - Transparency

From LMD

Jump to: navigation, search

<< Back to Getting started or Product Resources page

[edit]

From LMD-Tools version 3.5 on a "transparency" effect for TWinControl descendants was introduced. However the controls are not really transparent in the way you know it from e.g. a TLMDLabel control. They only share the same background with specialized parent components (TLMDBackPanel, TLMDGroupBox, TLMDPanelFill or since LMD-Tools 7 TLMDFormFill, TLMDBack etc.).

This fact explains why you won't see any change if you activate the Transparent property of TLMDSimplePanel if it is placed on an standard VCL panel. This text describes the steps to use the Transparent feature correctly.

How to...

Let's assume that we want to evaluate the Transparent feature with TLMDBackPanel and TLMDImageListBox controls. Use following steps:

  • Select a TLMDBackPanel TLMDBackPanel.PNG (Tab LMD Std) component as background control. Place the component on your form and set Align property to alClient (note: you may use a TLMDGroupBox TLMDGroupBox.PNG or TLMDPanelFill TLMDPanelFill.PNG component as well).
  • The TLMDBackPanel must be connected to a TLMDImageList / TLMDBitmapList container in order to display a bitmap texture. Place a TLMDBitmapList control (Tab LMD Cont) on your form and add any bitmap you would like to use as background texture. Enter the editor by doubeclicking the component. You may load the 'backg.bml' file (if available, check Images directory below your LMD-Tools installation) or add any custom bitmap. Exit the BitmapList editor.
  • Right click on the TLMDBackPanel component and select 'ImageList'. Select theTLMDBitmapList you created before and choose one bitmap. Exit the editor and the texture should be displayed in the TLMDBackPanel.
  • Now place a new TLMDBackPanel on the previous one (so that the new one is a child control). Enable the Transparent property and the second BackPanel should be displayed transparently.

BackPanels can even be nested. If you place an additional BackPanel into the second one, even the third will be drawn transparently after activating the Transparent property. Panels are ok, but what about more complex controls? Try it out: Place a TLMDImageListBox from the LMD List tab on the first TLMDBackPanel control and activate the Transparent property - that's it!

Some FAQs

Which components can act as parent background controls?

Windowed controls like TLMDBackBanel, TLMDPanelFill and TLMDGroup, which support background bitmaps and effects. New in LMD-Tools 7 is transpareny support for form controls like TLMDBack, TLMDFormShape or TLMDFormFill.

However please note: If you e.g. place a TLMDSimplePanel on a TLMDBackPanel, you may certainly place other controls with transparent effect on the SimplePanel (the first control is important here).

Which components support Transparent effect on the special background controls?

We try to add this feature to as many controls as possible. Examples are TLMDSimplePanel, TLMDCheckBox, TLMDRadioButton, TLMDImageListBox, TLMDScrollBox, TLMDSplitterPanel, all new LMD edit controls and more.

Are there any other advantages of these special background controls?

Even certain TGraphicControl descendants support the Background controls. E.g. TLMDAniCtrl and TLMDScrollText can use them for displaying flickerfree transparent animations, TLMDLImage for flickerfree transparent movement (like sprites) or TLMDShapeButton and TLMDMMButton controls for flickerfree transparent display.

Personal tools