[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'StdCtrls' (#lcl)

TCustomLabel.Transparent

Indicates whether the viewer can see through the control.

Declaration

Source position: stdctrls.pp line 1600

protected property TCustomLabel.Transparent : Boolean
  read GetTransparent
  write SetTransparent
  default True;

Description

When Transparent is set to False, the enclosing rectangle for the control is filled with the background Color for the label. When set to True, Color is not used to fill the background for the control and the underlying control is visible.

The property value is True when csOpaque has not been included in the style flags for the control. Changing the value for the property causes ControlStyle to be updated. When set to True, csOpaque is removed from ControlStyle. When set to False, csOpaque is included in ControlStyle. The control is redrawn when a new value is assigned to the property.

The default value for Transparent in the LCL is True. This differs from the default value in the Delphi VCL.

Values in Transparent and Color are used in the Paint method when the background and text for the control are drawn. When Transparent is False and Color has a value other than clNone, a solid brush is used to fill the display area with the value in Color.

Version info

Modified in LCL version 3.0. Transparent is no longer toggled when Color is changed. Its value is independent of Color.

See also

TCustomLabel.Color

  

Contains the color used for the background on the control.

TCustomLabel.Paint

  

Performs actions needed to draw the control on its Canvas.

TControl.ControlStyle

  

Contains style flags which control the features or behaviors enabled for the control.


Version 3.2 Generated 2024-02-25 Home