From 8992162e8af78f7b3995e4d7f4ee81a0ef1dfa25 Mon Sep 17 00:00:00 2001 From: dsiders Date: Wed, 4 May 2022 00:25:35 +0100 Subject: [PATCH] Docs: LCL/stdctrls. Updates topics for changes in 4ffce1ec, 1837c654. --- docs/xml/lcl/stdctrls.xml | 68 +++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 39 deletions(-) diff --git a/docs/xml/lcl/stdctrls.xml b/docs/xml/lcl/stdctrls.xml index 71f667c714..b6379fe92e 100644 --- a/docs/xml/lcl/stdctrls.xml +++ b/docs/xml/lcl/stdctrls.xml @@ -7639,7 +7639,9 @@ end; - Handles a notification that a component used in the control has been added or removed. + + Handles a notification that a component used in the control has been added or removed. +

Notification is an overridden method in TCustomStaticText, and calls the inherited method on entry. Notification ensures that FocusControl is set to Nil when it is the component for the opRemove Operation. @@ -9962,18 +9964,6 @@ end; Value for the Transparent property. - - Sets the value for the Color property. - - - TControl.SetColor - TControl.Color - - - - New value for the Color property. - - Sets the value for the FocusControl property. @@ -10119,19 +10109,10 @@ end; Height needed for the text using the calculated font size. - - Implements the storage specifier for the Color property. - - - - - - - True when a value other than clNone has been assigned to the Color property. - - - Adjusts the font height for the control text to fill the available client area. + + Adjusts the font height for the control text to fill the available client area. +

AdjustFontForOptimalFill is a Boolean function used to adjust the font height so that text in the label expands to fill the available client area for the control. AdjustFontForOptimalFill calls CalcFittingFontHeight to determine the font height needed to make the label text (caption) fill the Width for the control. The calculated font height is stored in the Font property. @@ -10262,19 +10243,22 @@ end; - Sets the color used for the background of the control. + Contains the color used for the background on the control.

- The default value for the property is clNone in TCustomLabel. This value is used because labels, by default, are transparent in the LCL. Please note that this differs from the Delphi VCL where the default value for Transparent is False. + Color is TColor property with the background color for the control. Color is re-introduced in TCustomLabel to remove the default value for the property.

- Changing the value in Color causes ControlStyle flags to be updated to include or exclude the value csOpaque as needed for the new property value. When set to clNone, the csOpaque flag is excluded from ControlStyle. Other values cause csOpaque to be included in ControlStyle. + Setting a new value for the property causes the value in ParentColor to be set to False. A CM_COLORCHANGED control message is performed, and the control is redrawn.

- Color is updated when a new value is assigned to the Transparent property. When Transparent is set to True, clNone is assigned to Color. When Transparent is set to False and color contains clNone, Color is changed to clBackground. + Values in Color and Font are used when the background and text for the control are drawn in the Paint method. Color is used when Transparent is set to False and the color value is not clNone. Use the Font property to assign the typeface and color used for the text displayed on the control.

+ + By default, label controls are transparent in the LCL. This differs from the Delphi VCL where the default value for Transparent is False. +

- Values in Color and Font are used when the background and text for the control are drawn in the Paint method. Use the Font property to assign the typeface and color used for the text displayed on the control. + Set Transparent to False to make the label opaque.

@@ -10282,7 +10266,6 @@ end; TControl.Color TControl.Font - TControl.ControlStyle
@@ -10332,7 +10315,9 @@ end; - If True, the font size is adjusted for optimal fill of the available space. + + If True, the font size is adjusted for optimal fill of the available space. +

OptimalFill is a Boolean property which indicates that the Font height should be maximized to fill the available width in the control. The default value for the property is False. @@ -10355,7 +10340,9 @@ end; - Underlines the character in the label that acts as the accelerator or short cut key. + + Underlines the character in the label that acts as the accelerator or short cut key. +

When False, an Ampersand (&) character in the label caption is displayed as an ordinary character (as used in the Object Inspector). @@ -10374,21 +10361,22 @@ end; Indicates whether the viewer can see through the control.

- When Transparent is set to False, the enclosing rectangle for the control is filled with the background Color for the label. If Color contains clNone, then clBackground is used in the Color property. + 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.

- When set to True, Color is changed to clNone and the background appears to be transparent (no opacity). + 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, which differs from the default value in the Delphi VCL. + The default value for Transparent in the LCL is True. This differs from the default value in the Delphi VCL.

- Values in Color, Transparent, and ParentColor are inter-dependent; changing the value in one property affects the values in the other properties. Use ParentColor to toggle values in Color and Transparent. Use Color to set an explicit background color for the control and toggle values in Transparent and ParentColor. + 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.

- TControl.ParentColor + + TControl.ControlStyle
@@ -10846,7 +10834,9 @@ end;
  • Be aware that an exception may be raised by the constructor when there is not enough memory to create an object, or something else goes wrong. If the exception is not handled inside the constructor, the object will be destroyed immediately. In this case Destroy will be called with a partially initialized object, so your destructor must check if the resources were really allocated before disposing of them.
  • -
  • Remember to call Free for all objects created on the constructor.
  • +
  • + Remember to call Free for all objects created in the constructor. +