From b5771ccd20d3bd3a60421a303b735d7873818a96 Mon Sep 17 00:00:00 2001 From: dsiders Date: Wed, 20 Jul 2022 01:58:47 +0100 Subject: [PATCH] Docs: LCL/extctrls. Adds, updates topics for changes in 13f4f576. * Adds TCustomPanel.VerticalAlignment, TCustomPanel.SetVertAlignment topics. * Updates TCustomPanel.Paint topic. * Adds TPanel.VerticalAlignment topic. * Minor grammar corrections. --- docs/xml/lcl/extctrls.xml | 58 +++++++++++++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 5 deletions(-) diff --git a/docs/xml/lcl/extctrls.xml b/docs/xml/lcl/extctrls.xml index 3a22050c93..2e2e1b413c 100644 --- a/docs/xml/lcl/extctrls.xml +++ b/docs/xml/lcl/extctrls.xml @@ -5282,6 +5282,7 @@ end; + @@ -5373,6 +5374,19 @@ end; New value for the property. + + Sets the value for the VerticalAlignment property. + + + + + + + + New value for the VerticalAlignment property. + + + Sets the value for the WordWrap property. @@ -5388,7 +5402,7 @@ end; - Adjusts the specified rectangle to account for border and bevels used in the control. + Adjusts the specified rectangle to account for borders and bevels used on the control.

@@ -5410,7 +5424,7 @@ end; - Gets the size used for new instance of the class type. + Gets the size used for a new instance of the class type.

GetControlClassDefaultSize is overridden to provide the default size for new instances of the class type. The return value is a TSize type which contains the dimensions for the new control. The CX member contains the Width for the panel, and defaults to 170 pixels. The CY member contains the Height for the panel, and defaults to 50 pixels. @@ -5468,13 +5482,13 @@ end;

- Paint is an overridden procedure which paints the panel including the bevels and caption defined for the control. Paint calls GetClientRect to get the rectangle used to draw the control. PaintBevel is called to draw both the inner and outer bevels for the control (when used). + Paint is an overridden procedure which draws the panel including the bevels and caption defined for the control. Paint calls GetClientRect to get the rectangle used to draw the control. PaintBevel is called to draw both the inner and outer bevels for the control (when used).

- When Caption contains a String value (other than an empty string), the Canvas for the control is used to render the text. Values in the BiDiMode, WordWrap, and Layout properties are applied to the text as needed. + When Caption contains a String value (other than an empty string), the Canvas for the control is used to render the text. Values in the Alignment, VerticalAlignment, UseRightToLeft, and WordWrap properties are applied to the Canvas properties as needed. The font color on the canvas is updated for the Enabled state in the control and use of theme services. The TextRect method in Canvas is called to output the Caption text to the client rectangle for the control.

- Paint calls the inherited Paint method prior to exit. + Paint calls the inherited method prior to exit to signal the OnPaint event handler (when assigned).

@@ -5519,6 +5533,39 @@ end;
+ + + Vertical alignment for the caption text displayed on the panel. + + +

+ VerticalAlignment is a TVerticalAlignment property which controls the vertical alignment for the Caption displayed on the panel. The default value for the property is taVerticalCenter, and causes the caption text to be centered vertically on the panel. Use taAlignTop to align caption text to the top of the panel. Use taAlignBottom to align caption text to the bottom of the panel. +

+

+ Changing the value for the property causes the Invalidate method to be called, and the panel is redrawn. +

+

+ VerticalAlignment is used in the Paint method to determine the text layout/style applied when the value in Caption is drawn on the Canvas for the control. +

+

+ Use Alignment to control the horizontal alignment for the Caption text displayed for the panel. +

+

+ Use Align to position the panel along one of the edges on the parent control or form. +

+
+ + + + + TControl.Caption + TVerticalAlignment + + + Added in LCL version 2.3, and available since LCL version 2.4.0. + +
+ Indicates if the Caption can be word wrapped when painted. @@ -5789,6 +5836,7 @@ end; +