mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-26 22:23:49 +02:00

* TCheckBox.Alignment * TRadioButton.Alignment * TComboBox.AdjustDropDown * TComboBox.ItemWidth
14039 lines
496 KiB
XML
14039 lines
496 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<fpdoc-descriptions>
|
|
<package name="lcl">
|
|
<!--
|
|
====================================================================
|
|
StdCtrls
|
|
====================================================================
|
|
-->
|
|
<module name="StdCtrls">
|
|
<short>Standard controls used in the Lazarus Component Library (LCL).</short>
|
|
<descr>
|
|
<p>
|
|
<file>stdctrls.pp</file> contains standard controls used in Lazarus Component
|
|
Library (LCL) applications. Most of the controls are found on the
|
|
<b>Standard</b> tab in the Lazarus IDE component palette, including:
|
|
</p>
|
|
<ul>
|
|
<li>TButton</li>
|
|
<li>TLabel</li>
|
|
<li>TEdit</li>
|
|
<li>TMemo</li>
|
|
<li>TToggleBox</li>
|
|
<li>TCheckBox</li>
|
|
<li>TRadioButton</li>
|
|
<li>TListBox</li>
|
|
<li>TComboBox</li>
|
|
<li>TScrollBar</li>
|
|
<li>TGroupBox</li>
|
|
</ul>
|
|
<p>
|
|
The following controls are added to the <b>Additional</b> tab in the Lazarus
|
|
IDE component palette:
|
|
</p>
|
|
<ul>
|
|
<li>TStaticText</li>
|
|
</ul>
|
|
</descr>
|
|
|
|
<!-- unresolved external references -->
|
|
<element name="Classes"/>
|
|
<element name="SysUtils"/>
|
|
<element name="Types"/>
|
|
<element name="LCLStrConsts"/>
|
|
<element name="LCLType"/>
|
|
<element name="LCLProc"/>
|
|
<element name="LCLIntf"/>
|
|
<element name="LMessages"/>
|
|
<element name="LResources"/>
|
|
<element name="Graphics"/>
|
|
<element name="ActnList"/>
|
|
<element name="Controls"/>
|
|
<element name="Forms"/>
|
|
<element name="Menus"/>
|
|
<element name="Themes"/>
|
|
<element name="TextStrings"/>
|
|
<element name="ExtendedStrings"/>
|
|
<element name="LazUTF8"/>
|
|
<element name="LazMethodList"/>
|
|
<element name="LazLoggerBase"/>
|
|
<element name="LazUtilities"/>
|
|
|
|
<element name="TEditCharCase">
|
|
<short>
|
|
Determines the case for text in an edit box or a combo-box control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TEditCharCase</var> is an enumerated type with values that determine the
|
|
case used for text in controls like <var>TCustomComboBox</var> and
|
|
<var>TCustomEdit</var>. TEditCharCase is the type used to implement the
|
|
<var>CharCase</var> property in both TCustomComboBox and TCustomEdit.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.CharCase"/>
|
|
<link id="TCustomEdit.CharCase"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TEditCharCase.ecNormal">
|
|
<short>Normal mode (no case conversion).</short>
|
|
</element>
|
|
<element name="TEditCharCase.ecUppercase">
|
|
<short>Converts every character entered to upper case.</short>
|
|
</element>
|
|
<element name="TEditCharCase.ecLowerCase">
|
|
<short>Converts every character entered to lower case.</short>
|
|
</element>
|
|
|
|
<element name="TEchoMode">
|
|
<short>How text in the edit box is displayed.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TEchoMode</var> is an enumerated type with values that control whether
|
|
text in a control is displayed with or without obfuscation. TEchoMode is the
|
|
type used to implement the <var>EchoMode</var> property in
|
|
<var>TCustomEdit</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.EchoMode"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TEchoMode.emNormal">
|
|
<short>Characters are shown unmodified.</short>
|
|
</element>
|
|
<element name="TEchoMode.emNone">
|
|
<short>All characters are shown as spaces.</short>
|
|
<descr/>
|
|
</element>
|
|
<element name="TEchoMode.emPassword">
|
|
<short>All characters shown as the value in PasswordChar.</short>
|
|
</element>
|
|
|
|
<element name="TScrollStyle">
|
|
<short>Indicates the visibility for scrollbars on a control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TScrollStyle</var> is an enumerated type with values that indicates the
|
|
visibility for one or more scrollbars displayed for an associated edit
|
|
control. TScrollStyle is the type used to implement the <var>ScrollBars</var>
|
|
property in <var>TCustomMemo</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomMemo.ScrollBars"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TScrollStyle.ssNone">
|
|
<short>No scrollbars are displayed.</short>
|
|
</element>
|
|
<element name="TScrollStyle.ssHorizontal">
|
|
<short>A horizontal scrollbar is shown.</short>
|
|
</element>
|
|
<element name="TScrollStyle.ssVertical">
|
|
<short>A vertical scrollbar is shown.</short>
|
|
</element>
|
|
<element name="TScrollStyle.ssBoth">
|
|
<short>Both horizontal and vertical scrollbars are shown.</short>
|
|
</element>
|
|
<element name="TScrollStyle.ssAutoHorizontal">
|
|
<short>A horizontal scrollbar is shown only when needed.</short>
|
|
</element>
|
|
<element name="TScrollStyle.ssAutoVertical">
|
|
<short>A vertical scrollbar is shown only when needed.</short>
|
|
</element>
|
|
<element name="TScrollStyle.ssAutoBoth">
|
|
<short>Both scrollbars are shown only when needed.</short>
|
|
</element>
|
|
|
|
<element name="TScrollCode">
|
|
<short>The scroll action type, as reported by the widget.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TScrollCode</var> is an enumerated type with values that represent
|
|
scroll actions received from the widgetset class for a scrollbar. The
|
|
positions and values in the enumeration correspond to the constants defined
|
|
in the <file>LCLType</file> unit, and include:
|
|
</p>
|
|
<ul>
|
|
<li>SB_LINEUP</li>
|
|
<li>SB_LINEDOWN</li>
|
|
<li>SB_PAGEUP</li>
|
|
<li>SB_PAGEDOWN</li>
|
|
<li>SB_THUMBPOSITION</li>
|
|
<li>SB_THUMBTRACK</li>
|
|
<li>SB_TOP</li>
|
|
<li>SB_BOTTOM</li>
|
|
<li>SB_ENDSCROLL</li>
|
|
</ul>
|
|
<p>
|
|
Values in TScrollCode are passed as an argument to the <var>Scroll</var>
|
|
method in <var>TCustomScrollBar</var>, and subsequently to the
|
|
<var>TScrollEvent</var> event handler in the <var>OnScroll</var> property.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TScrollEvent"/>
|
|
<link id="TCustomScrollBar.Scroll"/>
|
|
<link id="TCustomScrollBar.OnScroll"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TScrollCode.scLineUp">
|
|
<short>Scroll one line up (column left).</short>
|
|
</element>
|
|
<element name="TScrollCode.scLineDown">
|
|
<short>Scroll one line down (column right).</short>
|
|
</element>
|
|
<element name="TScrollCode.scPageUp">
|
|
<short>Scroll one page up (left).</short>
|
|
</element>
|
|
<element name="TScrollCode.scPageDown">
|
|
<short>Scroll one page down (right).</short>
|
|
</element>
|
|
<element name="TScrollCode.scPosition">
|
|
<short>Scroll to the specified position.</short>
|
|
</element>
|
|
<element name="TScrollCode.scTrack">
|
|
<short>Scroll tracking to the specified position.</short>
|
|
</element>
|
|
<element name="TScrollCode.scTop">
|
|
<short>Scroll to the top (left) end.</short>
|
|
</element>
|
|
<element name="TScrollCode.scBottom">
|
|
<short>Scroll to the bottom (right) end.</short>
|
|
</element>
|
|
<element name="TScrollCode.scEndScroll">
|
|
<short>Scrolling finished.</short>
|
|
</element>
|
|
|
|
<element name="TScrollEvent">
|
|
<short>Defines an event handler type for scrollbar events.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TScrollEvent</var> is an object procedure which defines an event handler
|
|
signalled when a scroll event occurs in the scrollbar widgetset class. The
|
|
event handler is called before the new <var>Position</var> is set for the
|
|
control. The value in Position can be adjusted to implement custom scrollbar
|
|
behavior.
|
|
</p>
|
|
<p>
|
|
TScrollEvent is the type used to implement the <var>OnScroll</var> event
|
|
handler in <var>TCustomScrollBar</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.OnScroll"/>
|
|
<link id="TCustomScrollBar.Scroll"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TScrollEvent.Sender">
|
|
<short>The scrollbar for the event notification.</short>
|
|
</element>
|
|
<element name="TScrollEvent.ScrollCode">
|
|
<short>The scroll action for the notification.</short>
|
|
</element>
|
|
<element name="TScrollEvent.ScrollPos">
|
|
<short>New position for the scrollbar.</short>
|
|
<descr>
|
|
<p>
|
|
The suggested new scroll position. Change this value to implement custom
|
|
scroll behavior.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar">
|
|
<short>The base class for <var>TScrollBar</var>.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TCustomScrollBar</var> is a <var>TWinControl</var> descendant which
|
|
defines the base class for a scrollbar, such as <var>TScrollBar</var>.
|
|
TCustomScrollBar can be used for horizontal or vertical scrollbars displayed
|
|
on a form or scrolling window control.
|
|
</p>
|
|
<p>
|
|
A scrollbar allows the content in a client area to be scrolled when it
|
|
extends beyond the window bounds. TCustomScrollBar provides the properties,
|
|
methods, and events needed to interface with the widgetset class for the
|
|
platform or operating system.
|
|
</p>
|
|
<p>
|
|
Use the <var>Kind</var> property to specify the orientation for the scrollbar.
|
|
</p>
|
|
<p>
|
|
Use <var>Min</var>, <var>Max</var>, <var>SmallChange</var>,
|
|
<var>LargeChange</var>, <var>PageSize</var> and <var>Position</var>
|
|
properties to control the scrolling behavior for the scrollbar.
|
|
</p>
|
|
<p>
|
|
Use the <var>OnChange</var> and <var>OnScroll</var> event handlers to respond
|
|
to programmatic changes to the scrollbar, or messages received from the
|
|
widgetset class.
|
|
</p>
|
|
<p>
|
|
See <link id="#lcl.forms.TControlScrollBar">TControlScrollBar</link> for
|
|
information about scrollbars used for windowed controls.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TScrollBar"/>
|
|
<link id="#lcl.forms.TScrollingWinControl">TScrollingWinControl</link>
|
|
<link id="#lcl.forms.TControlScrollBar">TControlScrollBar</link>
|
|
<link id="#lcl.controls.TWinControl">TWinControl</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.FKind"/>
|
|
<element name="TCustomScrollBar.FPosition"/>
|
|
<element name="TCustomScrollBar.FMin"/>
|
|
<element name="TCustomScrollBar.FMax"/>
|
|
<element name="TCustomScrollBar.FPageSize"/>
|
|
<element name="TCustomScrollBar.FRTLFactor"/>
|
|
<element name="TCustomScrollBar.FSmallChange"/>
|
|
<element name="TCustomScrollBar.FLargeChange"/>
|
|
<element name="TCustomScrollBar.FOnChange"/>
|
|
<element name="TCustomScrollBar.FOnScroll"/>
|
|
|
|
<!-- private -->
|
|
<element name="TCustomScrollBar.DoScroll">
|
|
<short>
|
|
Performs actions needed to translate and apply scrollbar notification
|
|
messages.
|
|
</short>
|
|
</element>
|
|
<element name="TCustomScrollBar.DoScroll.Message">
|
|
<short>Message examined and applied in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.NotRightToLeft">
|
|
<short>Always returns <b>True</b></short>
|
|
</element>
|
|
<element name="TCustomScrollBar.NotRightToLeft.Result">
|
|
<short>Always returns <b>True</b>.</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.SetKind">
|
|
<short>Sets the value for the Kind property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.Kind"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomScrollBar.SetKind.Value">
|
|
<short>New value for the Kind property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.SetMax">
|
|
<short>Sets the value for the Max property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.Max"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomScrollBar.SetMax.Value">
|
|
<short>New value for the Max property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.SetMin">
|
|
<short>Sets the value for the Min property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.Min"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomScrollBar.SetMin.Value">
|
|
<short>New value for the Min property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.SetPosition">
|
|
<short>Sets the value for the Position property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.Position"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomScrollBar.SetPosition.Value">
|
|
<short>New value for the Position property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.SetPageSize">
|
|
<short>Sets the value for the PageSize property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.PageSize"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomScrollBar.SetPageSize.Value">
|
|
<short>New value for the PageSize property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.CNHScroll">
|
|
<short>Handles the LM_HSCROLL message for the control.</short>
|
|
</element>
|
|
<element name="TCustomScrollBar.CNHScroll.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.CNVScroll">
|
|
<short>Handles the LM_VSCROLL message for the control.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomScrollBar.CNVScroll.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.CNCtlColorScrollBar">
|
|
<short>Handles the CN_CTLCOLORSCROLLBAR message for the control.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomScrollBar.CNCtlColorScrollBar.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.WMEraseBkgnd">
|
|
<short>Handles the LM_ERASEBKGND message for the control.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomScrollBar.WMEraseBkgnd.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.WSRegisterClass">
|
|
<short>
|
|
Registers the widgetset class created for new instances of the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>WSRegisterClass</var> is an overridden procedure used to register the
|
|
widgetset class instance created for new instances of the control.
|
|
WSRegisterClass calls the inherited method, and calls
|
|
<var>RegisterCustomScrollBar</var> for the widgetset.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.lclclasses.TLCLComponent.WSRegisterClass">TLCLComponent.WSRegisterClass</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.GetControlClassDefaultSize">
|
|
<short>Gets the default size for new instances of the class.</short>
|
|
<descr>
|
|
<p>
|
|
<var>GetControlClassDefaultSize</var> is an overridden <var>TSize</var> class
|
|
function used to get the default size for new instances of the class.
|
|
</p>
|
|
<p>
|
|
GetControlClassDefaultSize sets the values in members in the return value.
|
|
The <var>CX</var> member contains the width for the new instance, and is set
|
|
121 (pixels). The <var>CY</var> member contains the height for the new
|
|
instance, and is set to the number of pixels returned from
|
|
<var>GetSystemMetrics</var> for the <var>SM_CYHSCROLL</var> constant.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.GetControlClassDefaultSize">TControl.GetControlClassDefaultSize</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomScrollBar.GetControlClassDefaultSize.Result">
|
|
<short>
|
|
TSize instance with the default width and height for the control.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.CreateParams">
|
|
<short>Initializes the creation parameters for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>CreateParams</var> is an overridden method used initialize the creation
|
|
parameters for the class instance. CreateParams calls the inherited method,
|
|
and ensures that the <var>Params</var> argument is updated to include the
|
|
value from the <var>Kind</var> property in the style information for the
|
|
<var>TCreateParams</var> instance. This ensures that the correct orientation
|
|
for the scrollbar is used in the creation parameters.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.Kind"/>
|
|
<link id="TScrollBarKind"/>
|
|
<link id="TCustomScrollBar.CreateWnd"/>
|
|
<link id="#lcl.lcltype.TCreateParams">TCreateParams</link>
|
|
<link id="#lcl.controls.TWinControl.CreateParams">TWinControl.CreateParams</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomScrollBar.CreateParams.Params">
|
|
<short>The creation parameters and flags for the instance.</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.CreateWnd">
|
|
<short>
|
|
<var>CreateWnd</var> - calls inherited <var>CreateWnd</var> then initializes
|
|
various Scroll Info properties.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
The inherited method creates the interface object, sets parameters and
|
|
assigns the handle. Then the size of scrollbar, maximum and minimum values,
|
|
page size and position of scrollbar are set.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.CreateWnd">TWinControl.CreateWnd</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.Change">
|
|
<short>Invokes the OnChange event handler for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Change</var> is a procedure used to perform the <var>Changed</var>
|
|
method in the ancestor class, and to signal the <var>OnChange</var> event
|
|
handler (when assigned) for the control. Change is called when
|
|
<var>SetParams</var> is used to update the <var>Position</var>,
|
|
<var>Min</var>, <var>Max</var>, or <var>PageSize</var> values in the
|
|
scrollbar.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.OnChange"/>
|
|
<link id="TCustomScrollBar.SetParams"/>
|
|
<link id="TCustomScrollBar.Position"/>
|
|
<link id="TCustomScrollBar.Min"/>
|
|
<link id="TCustomScrollBar.Max"/>
|
|
<link id="TCustomScrollBar.PageSize"/>
|
|
<link id="#lcl.controls.TControl.Changed">TControl.Changed</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.Scroll">
|
|
<short>Signals the OnScroll event handler.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Scroll</var> is a method used to signal the <var>OnScroll</var> event
|
|
handler (when assigned) for the control.
|
|
</p>
|
|
<p>
|
|
<var>ScrollCode</var> contains the scrollbar command constant for the scroll
|
|
operation. <var>ScrollPos</var> contains the new position for the scrollbar
|
|
when the operation is completed.
|
|
</p>
|
|
<p>
|
|
Scroll is called from the implementation of the private DoScroll method,
|
|
which handles scrollbar control messages and sets the values for the
|
|
arguments to the method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.OnScroll"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomScrollBar.Scroll.ScrollCode">
|
|
<short>
|
|
Scroll command code for the operation; up or down a line, a page, to the top
|
|
or bottom, etc.
|
|
</short>
|
|
</element>
|
|
<element name="TCustomScrollBar.Scroll.ScrollPos">
|
|
<short>The new position for the scrollbar.</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.CalculatePreferredSize">
|
|
<short>Gets the preferred size for new instances of the class.</short>
|
|
<descr>
|
|
<p>
|
|
<var>CalculatePreferredSize</var> is overridden in TCustomScrollBar. The
|
|
inherited method is called, and the value in PreferredHeight or
|
|
PreferredWidth is updated, based on the value in <var>Kind</var>, to use the
|
|
corresponding value from <var>GetSystemMetrics</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.Kind"/>
|
|
<link id="#lcl.controls.TWinControl.CalculatePreferredSize">TWinControl.CalculatePreferredSize</link>
|
|
<link id="#lcl.lclintf.GetSystemMetrics">GetSystemMetrics</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomScrollBar.CalculatePreferredSize.PreferredWidth">
|
|
<short>Preferred width calculated for the control.</short>
|
|
</element>
|
|
<element name="TCustomScrollBar.CalculatePreferredSize.PreferredHeight">
|
|
<short>Preferred height calculated for the control.</short>
|
|
</element>
|
|
<element name="TCustomScrollBar.CalculatePreferredSize.WithThemeSpace">
|
|
<short>
|
|
<b>True</b> when space is reserved for theme element details in the
|
|
calculated dimensions.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.Create">
|
|
<short>Constructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Create</var> is the overridden constructor for the class instance, and
|
|
calls the inherited constructor on entry.
|
|
</p>
|
|
<p>
|
|
Create ensures that the component style is updated to <var>csScrollBar</var>
|
|
and sets the initial bounds for the control to the values returned from
|
|
<var>GetControlClassDefaultSize</var>. Create sets the default values for
|
|
properties, like:
|
|
</p>
|
|
<dl>
|
|
<dt>TabStop</dt>
|
|
<dd>Set to <b>True</b>.</dd>
|
|
<dt>ControlStyle </dt>
|
|
<dd>
|
|
Includes the values: [csFramed, csDoubleClicks, csOpaque]. Excludes the
|
|
values: [csAcceptsControls, csDoubleClicks, csCaptureMouse, csSetCaption].
|
|
</dd>
|
|
<dt>Kind</dt>
|
|
<dd>Set to sbHorizontal.</dd>
|
|
<dt>Position</dt>
|
|
<dd>Set to 0.</dd>
|
|
<dt>Min</dt>
|
|
<dd>Set to 0.</dd>
|
|
<dt>Max</dt>
|
|
<dd>Set to 100.</dd>
|
|
<dt>SmallChange</dt>
|
|
<dd>Set to 1.</dd>
|
|
<dt>LargeChange</dt>
|
|
<dd>Set to 1.</dd>
|
|
</dl>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomScrollBar.Create.AOwner">
|
|
<short>Owner of the class instance.</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.SetParams">
|
|
<short>
|
|
Updates the Min and Max values, the size of the page, and the position in the
|
|
scrollbar.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>SetParams</var> is an overloaded procedure used to update the values in
|
|
the <var>TScrollInfo</var> structure passed to the widgetset class. Values
|
|
passed in parameters are stored in the TScrollInfo instance, and used to
|
|
validate the new settings for the scrollbar.
|
|
</p>
|
|
<p>
|
|
SetParams raises an <var>EInvalidOperation</var> exception if the value in
|
|
AMax is smaller than the value in AMin.
|
|
</p>
|
|
<p>
|
|
The value in <var>APosition</var> is normalized to ensure that it is in the
|
|
range specified by <var>AMin</var> and <var>AMax</var>.
|
|
</p>
|
|
<p>
|
|
<var>APageSize</var> is set to 0 (zero) if it contains a negative value.
|
|
</p>
|
|
<p>
|
|
When any of the parameter values differ from the current values in the class
|
|
instance, the class instance is updated. <var>SetScrollInfo</var> is called
|
|
to apply the changed values when a handle has been allocated for the control.
|
|
<var>SetScrollPos</var> is called when APosition contains a value different
|
|
than the one in the class instance. The <var>Change</var> method is called to
|
|
process the updated values in the control and signal the <var>OnChange</var>
|
|
event handler (when assigned). The <var>SetParams</var> method in the
|
|
widgetset class is called to synchronize the changes.
|
|
</p>
|
|
<p>
|
|
SetParams is called when a new value is assigned to the <var>Position</var>,
|
|
<var>Min</var>, <var>Max</var>, or <var>PageSize</var> property.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.Position"/>
|
|
<link id="TCustomScrollBar.Min"/>
|
|
<link id="TCustomScrollBar.Max"/>
|
|
<link id="TCustomScrollBar.PageSize"/>
|
|
<link id="TCustomScrollBar.Change"/>
|
|
<link id="TCustomScrollBar.OnChange"/>
|
|
<link id="TScrollInfo"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomScrollBar.SetParams.APosition">
|
|
<short>Value applied to the scrollbar position.</short>
|
|
</element>
|
|
<element name="TCustomScrollBar.SetParams.AMin">
|
|
<short>Value applied to the scrollbar minimum value.</short>
|
|
</element>
|
|
<element name="TCustomScrollBar.SetParams.AMax">
|
|
<short>Value applied to the scrollbar maximum value.</short>
|
|
</element>
|
|
<element name="TCustomScrollBar.SetParams.APageSize">
|
|
<short>Value applied to the scrollbar page size.</short>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.Kind">
|
|
<short>Contains the scrollbar orientation, horizontal or vertical.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Kind</var> is a <var>TScrollBarKind</var> property which indicates the
|
|
orientation for the scrollbar.
|
|
</p>
|
|
<p>
|
|
Setting a new value for the property causes the <var>Constraints</var> for
|
|
the control to be updated with values from the widgetset class. The widgetset
|
|
class is also notified of the new value for the property.
|
|
<var>SetBounds</var> is called to refresh the <var>Width</var> and
|
|
<var>Height</var> for the control.
|
|
</p>
|
|
<p>
|
|
The default value for the property is <var>sbHorizontal</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.Constraints">TControl.Constraints</link>
|
|
<link id="#lcl.controls.TControl.Width">TControl.Width</link>
|
|
<link id="#lcl.controls.TControl.Height">TControl.Height</link>
|
|
<link id="#lcl.controls.TWinControl.SetBounds">TWinControl.SetBounds</link>
|
|
<link id="TScrollBarKind"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.LargeChange">
|
|
<short>The distance to scroll on an click beneath the slider.</short>
|
|
<descr>
|
|
<p>
|
|
A large change is produced by clicks on the blank area above or below the
|
|
slider; it is rather analogous to the Page Down or Page Up functions of the
|
|
Keyboard, and is typically set up to move the slider and the control contents
|
|
by a full page (window size).
|
|
</p>
|
|
<p>
|
|
Use SmallChange for the value applied when the Up or Down arrows are clicked,
|
|
or when one of the cursor keys is pressed to navigate in the associated
|
|
control.
|
|
</p>
|
|
</descr>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.Max">
|
|
<short>
|
|
The maximum value for the bottom or right position depending on orientation.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
The default value for the property is <b>100</b>. Changing the value for the
|
|
property cause SetParams to be called to apply the values in Position, Min,
|
|
Max, and PageSize to the scrollbar information stored in the widgetset class
|
|
instance.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.Min"/>
|
|
<link id="TCustomScrollBar.Position"/>
|
|
<link id="TCustomScrollBar.PageSize"/>
|
|
<link id="TCustomScrollBar.SetParams"/>
|
|
<link id="#lcl.lcltype.TScrollInfo">TScrollInfo</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.Min">
|
|
<short>
|
|
The minimum value for the top or left position depending on orientation.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
The default value for the property is <b>0</b>. Changing the value for the
|
|
property cause SetParams to be called to apply the values in Position, Min,
|
|
Max, and PageSize to the scrollbar information stored in the widgetset class
|
|
instance.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.Max"/>
|
|
<link id="TCustomScrollBar.Position"/>
|
|
<link id="TCustomScrollBar.PageSize"/>
|
|
<link id="TCustomScrollBar.SetParams"/>
|
|
<link id="#lcl.lcltype.TScrollInfo">TScrollInfo</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.PageSize">
|
|
<short>The size of the slider relative to the total scroll range.</short>
|
|
<descr>
|
|
<p>
|
|
PageSize contains the size for the proportionally-sized slider for the
|
|
control.
|
|
</p>
|
|
<p>
|
|
PageSize is used in the CreateWnd method when the initial scrollbar
|
|
information is assigned for the control. It is also one of the arguments
|
|
passed to the SetParams method to update the scrollbar information in the
|
|
widgetset class instance.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.Position">
|
|
<short>The position of the slider in the scrollbar.</short>
|
|
<descr>
|
|
<p>
|
|
Position contains a value in the range specified by the Min and Max
|
|
properties. The default value for the property is 0. Changing the value for
|
|
the property causes the SetParams method to be called to apply the values in
|
|
Position, Min, Max, and PageSize to the scrollbar information stored in the
|
|
widgetset class instance.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.Max"/>
|
|
<link id="TCustomScrollBar.Min"/>
|
|
<link id="TCustomScrollBar.PageSize"/>
|
|
<link id="TCustomScrollBar.SetParams"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.SmallChange">
|
|
<short>
|
|
The distance to scroll when the up or down button is clicked.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
A small change occurs when the up or down buttons are clicked, or by up/down
|
|
keyboard commands. It is typically used for scrolling by a few pixels, or by
|
|
a single row or column of text.
|
|
</p>
|
|
<p>
|
|
Use LargeChange for the value applied when clicking the thumb in the
|
|
scrollbar, or when using the Home or End keys to navigate in the associated
|
|
control.
|
|
</p>
|
|
</descr>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.TabStop">
|
|
<short>Enables keyboard navigation using the Tab or Shift+Tab keys.</short>
|
|
<descr>
|
|
<p>
|
|
Allows the user to navigate to this control by pressing the Tab or Shift+Tab
|
|
keys. The default value for the property is <b>True</b> in TCustomScrollBar.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.TabStop">TWinControl.TabStop</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.OnChange">
|
|
<short>
|
|
Event handler signalled when the value in Position, Min, Max, or PageSize is
|
|
changed.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>OnChange</var> is a <var>TNotifyEvent</var> property which contains an
|
|
event handler signalled when scroll information is updated in the control.
|
|
OnChange is signalled (when assigned) from the Change method, and occurs when
|
|
the value in Position, Min, Max, or PageSize is changed using SetParams.
|
|
</p>
|
|
<p>
|
|
Use the OnScroll event handler to respond to events signalled for control
|
|
messages dispatched to the Scroll method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.Position"/>
|
|
<link id="TCustomScrollBar.Min"/>
|
|
<link id="TCustomScrollBar.Max"/>
|
|
<link id="TCustomScrollBar.PageSize"/>
|
|
<link id="TCustomScrollBar.Change"/>
|
|
<link id="TCustomScrollBar.SetParams"/>
|
|
<link id="TCustomScrollBar.OnScroll"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomScrollBar.OnScroll">
|
|
<short>Event handler signalled when scrollbar messages are applied.</short>
|
|
<descr>
|
|
<p>
|
|
<var>OnScroll</var> is a <var>TScrollEvent</var> property which provides an
|
|
event handler signalled when the position for the scrollbar has been changed.
|
|
</p>
|
|
<p>
|
|
<var>Sender</var> contains the scrollbar for the event.
|
|
</p>
|
|
<p>
|
|
<var>ScrollCode</var> contains the scroll command constant for the operation.
|
|
</p>
|
|
<p>
|
|
<var>ScrollPos</var> contains the new position for the scrollbar when the
|
|
operation is completed. The event handler can be used to override the value
|
|
in ScrollPos before it is applied to the Position property in the class
|
|
instance.
|
|
</p>
|
|
<p>
|
|
OnScroll is signalled (when assigned) from the <var>Scroll</var> method, and
|
|
occurs when control messages, like CNHScroll and CNVScroll, are processed and
|
|
applied.
|
|
</p>
|
|
<p>
|
|
Use the <var>OnChange</var> event to respond to programmatic changes to
|
|
property values in the scrollbar.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.Position"/>
|
|
<link id="TCustomScrollBar.Scroll"/>
|
|
<link id="TCustomScrollBar.OnChange"/>
|
|
<link id="TScrollEvent"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TScrollBar">
|
|
<short>
|
|
A control that allows the user to scroll the content in an associated control
|
|
by moving a slider.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
A control that allows the user to scroll the content in a windowed control,
|
|
by moving a slider.
|
|
</p>
|
|
<p>
|
|
TScrollBar appears as a long rectangular track bar, within which a smaller
|
|
contrasting block or slider can move up and down (or from side to side in a
|
|
horizontal ScrollBar). It has small triangular indicators or pointers on one
|
|
or both ends of the bar, depending on the widgetset.
|
|
</p>
|
|
<p>
|
|
Clicking with the mouse on one of the pointers moves the slider a small
|
|
distance (<var>SmallChange</var>) in the specified direction. Clicking with
|
|
the mouse in the blank area of the scrollbar above or below the slider makes
|
|
the slider move by a larger increment (<var>LargeChange</var>).
|
|
</p>
|
|
<p>
|
|
The slider can also be moved by clicking on it with the mouse, and holding
|
|
down the button while moving the mouse. The slider then follows the mouse
|
|
until the button is released.
|
|
</p>
|
|
<p>
|
|
If the mouse has a scrollwheel, the slider also can be moved by rotating the
|
|
wheel.
|
|
</p>
|
|
<p>
|
|
The arrow keys or the Page Up/Page Down keys on the keyboard can be used to
|
|
move the slider, too.
|
|
</p>
|
|
<p>
|
|
The location of the slider along the track is held in the <var>Position</var>
|
|
property. It's the programmer's responsibility to ensure that the content of
|
|
the window is scrolled to the new Position of the scrollbar.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomScrollBar.OnChange"/>
|
|
<link id="HowToUseStdCtrls"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TScrollBar.Align" link="#lcl.controls.TControl.Align"/>
|
|
<element name="TScrollBar.Anchors" link="#lcl.controls.TControl.Anchors"/>
|
|
<element name="TScrollBar.BidiMode" link="#lcl.controls.TControl.BiDiMode"/>
|
|
<element name="TScrollBar.BorderSpacing" link="#lcl.controls.TControl.BorderSpacing"/>
|
|
<element name="TScrollBar.Constraints" link="#lcl.controls.TControl.Constraints"/>
|
|
<element name="TScrollBar.DoubleBuffered" link="#lcl.controls.TWinControl.DoubleBuffered"/>
|
|
<element name="TScrollBar.DragCursor" link="#lcl.controls.TControl.DragCursor"/>
|
|
<element name="TScrollBar.DragKind" link="#lcl.controls.TControl.DragKind"/>
|
|
<element name="TScrollBar.DragMode" link="#lcl.controls.TControl.DragMode"/>
|
|
<element name="TScrollBar.Enabled" link="#lcl.controls.TControl.Enabled"/>
|
|
<element name="TScrollBar.Kind" link="#lcl.stdctrls.TCustomScrollBar.Kind"/>
|
|
<element name="TScrollBar.LargeChange" link="#lcl.stdctrls.TCustomScrollBar.LargeChange"/>
|
|
<element name="TScrollBar.Max" link="#lcl.stdctrls.TCustomScrollBar.Max"/>
|
|
<element name="TScrollBar.Min" link="#lcl.stdctrls.TCustomScrollBar.Min"/>
|
|
<element name="TScrollBar.OnChange" link="#lcl.stdctrls.TCustomScrollBar.OnChange"/>
|
|
<element name="TScrollBar.OnContextPopup" link="#lcl.controls.TControl.OnContextPopup"/>
|
|
<element name="TScrollBar.OnDragDrop" link="#lcl.controls.TControl.OnDragDrop"/>
|
|
<element name="TScrollBar.OnDragOver" link="#lcl.controls.TControl.OnDragOver"/>
|
|
<element name="TScrollBar.OnEndDrag" link="#lcl.controls.TControl.OnEndDrag"/>
|
|
<element name="TScrollBar.OnEnter" link="#lcl.controls.TWinControl.OnEnter"/>
|
|
<element name="TScrollBar.OnExit" link="#lcl.controls.TWinControl.OnExit"/>
|
|
<element name="TScrollBar.OnKeyDown" link="#lcl.controls.TWinControl.OnKeyDown"/>
|
|
<element name="TScrollBar.OnKeyPress" link="#lcl.controls.TWinControl.OnKeyPress"/>
|
|
<element name="TScrollBar.OnKeyUp" link="#lcl.controls.TWinControl.OnKeyUp"/>
|
|
<element name="TScrollBar.OnScroll" link="#lcl.stdctrls.TCustomScrollBar.OnScroll"/>
|
|
<element name="TScrollBar.OnStartDrag" link="#lcl.controls.TControl.OnStartDrag"/>
|
|
<element name="TScrollBar.OnUTF8KeyPress" link="#lcl.controls.TWinControl.OnUTF8KeyPress"/>
|
|
<element name="TScrollBar.PageSize" link="#lcl.stdctrls.TCustomScrollBar.PageSize"/>
|
|
<element name="TScrollBar.ParentBidiMode" link="#lcl.controls.TControl.ParentBiDiMode"/>
|
|
<element name="TScrollBar.ParentDoubleBuffered" link="#lcl.controls.TWinControl.ParentDoubleBuffered"/>
|
|
<element name="TScrollBar.ParentShowHint" link="#lcl.controls.TControl.ParentShowHint"/>
|
|
<element name="TScrollBar.PopupMenu" link="#lcl.controls.TControl.PopupMenu"/>
|
|
<element name="TScrollBar.Position" link="#lcl.stdctrls.TCustomScrollBar.Position"/>
|
|
<element name="TScrollBar.ShowHint" link="#lcl.controls.TControl.ShowHint"/>
|
|
<element name="TScrollBar.SmallChange" link="#lcl.stdctrls.TCustomScrollBar.SmallChange"/>
|
|
<element name="TScrollBar.TabOrder" link="#lcl.controls.TWinControl.TabOrder"/>
|
|
<element name="TScrollBar.TabStop" link="#lcl.stdctrls.TCustomScrollBar.TabStop"/>
|
|
<element name="TScrollBar.Visible" link="#lcl.controls.TControl.Visible"/>
|
|
|
|
<element name="TCustomGroupBox">
|
|
<short>
|
|
The base class for <var>TGroupBox</var>, <var>TRadioGroup</var> and
|
|
<var>TCheckGroup</var>.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TCustomGroupBox</var> is a visual component used to organize related
|
|
controls into a group. It acts a container. TCustomGroupBox is the base class
|
|
for <var>TGroupBox</var>, <var>TRadioGroup</var> and <var>TCheckGroup</var>.
|
|
Do not create instances of TCustomGroupBox; use one of the descendent classes.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TGroupBox"/>
|
|
<link id="#lcl.extctrls.TRadioGroup">TRadioGroup</link>
|
|
<link id="#lcl.extctrls.TCheckGroup">TCheckGroup</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomGroupBox.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
|
|
|
|
<element name="TCustomGroupBox.GetControlClassDefaultSize" link="#lcl.controls.TControl.GetControlClassDefaultSize"/>
|
|
<element name="TCustomGroupBox.GetControlClassDefaultSize.Result">
|
|
<short>Default size for new instances of the class.</short>
|
|
</element>
|
|
|
|
<element name="TCustomGroupBox.UpdateOpaque">
|
|
<short>Updates the control style when the parent background is used.</short>
|
|
<descr>
|
|
<p>
|
|
<var>UpdateOpaque</var> is a method used to update the control style flags
|
|
when the parent background is used for the control. When the
|
|
<var>ParentBackground</var> property is set to <b>True</b>,
|
|
<var>ControlStyle</var> is updated to remove the <var>csOpaque</var> flag. If
|
|
ParentBackground is not enabled, ControlStyle is updated to include the
|
|
csOpaque flag.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomGroupBox.ParentBackground"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomGroupBox.CreateParams">
|
|
<short>Ensures that creation parameters are updated for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>CreateParams</var> is overridden in <var>TCustomGroupBox</var> to ensure
|
|
that the <var>Style</var> information in <var>Params</var> is updated to
|
|
include the value <var>BS_GROUPBOX</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.CreateParams">TWinControl.CreateParams</link>
|
|
<link id="#lcl.lcltype.TCreateParams">TCreateParams</link>
|
|
<link id="#lcl.lcltype.BS_GROUPBOX">BS_GROUPBOX</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomGroupBox.CreateParams.Params">
|
|
<short>Creation parameters updated in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomGroupBox.SetColor">
|
|
<short>Sets the value for the Color property.</short>
|
|
<descr>
|
|
<p>
|
|
<var>SetColor</var> is a method used to set the value in the <var>Color</var>
|
|
property. It calls the inherited method on entry.
|
|
</p>
|
|
<p>
|
|
When the value for the Color property is set to <var>clDefault</var>, or has
|
|
the same value as the Color property in <var>Parent</var>, no additional
|
|
actions are performed in the method. Otherwise, the value in ParentBackground
|
|
is set to <b>False</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomGroupBox.ParentBackground"/>
|
|
<link id="#lcl.controls.TControl.Color">TControl.Color</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomGroupBox.SetColor.Value">
|
|
<short>New value for the Color property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomGroupBox.SetParentBackground">
|
|
<short>Sets the value for the ParentBackground property.</short>
|
|
<descr>
|
|
<p>
|
|
<var>SetParentBackground</var> is an overridden method in
|
|
<var>TCustomGroupBox</var> used to set the value for the
|
|
<var>ParentBackground</var> property. It calls the inherited method on entry.
|
|
</p>
|
|
<p>
|
|
When the property value is set to <b>True</b> and <var>ParentColor</var> is
|
|
enabled, the Color property in the <var>Parent</var> control is assigned to
|
|
the Color property for the group box. Otherwise, <var>clDefault</var> is
|
|
assigned to the <var>Color</var> property.
|
|
</p>
|
|
<p>
|
|
SetParentBackground calls the <var>UpdateOpaque</var> method to ensure that
|
|
the ControlStyle flags for the control reflect the transparency needed to
|
|
draw the parent background.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomGroupBox.SetParentBackground"/>
|
|
<link id="TCustomGroupBox.UpdateOpaque"/>
|
|
<link id="#lcl.controls.TControl.ParentColor">TControl.ParentColor</link>
|
|
<link id="#lcl.controls.TControl.Parent">TControl.Parent</link>
|
|
<link id="#lcl.graphics.clDefault">clDefault</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomGroupBox.SetParentBackground.AParentBackground">
|
|
<short>New value for the ParentBackground property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomGroupBox.CMParentColorChanged">
|
|
<short>Handles the CM_PARENTCOLORCHANGED message for the control.</short>
|
|
<descr>
|
|
<p>
|
|
Calls the inherited method on entry to update the value in the
|
|
<var>Color</var> property. Calls <var>UpdateOpaque</var> to adjust the
|
|
control style flags when the parent color is applied.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomGroupBox.UpdateOpaque"/>
|
|
<link id="#lcl.controls.TControl.ParentColor">TControl.ParentColor</link>
|
|
<link id="#lcl.controls.TControl.CMParentColorChanged">TControl.CMParentColorChanged</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomGroupBox.CMParentColorChanged.Message">
|
|
<short>Control message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomGroupBox.Create">
|
|
<short>Constructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Create</var> is the overridden constructor for the class instance. It
|
|
calls the inherited constructor on entry to the method. Create ensures that
|
|
the component style is set to the value <var>csGroupBox</var>, and includes
|
|
the value <var>csAcceptsControls</var> in the <var>ControlStyle</var>
|
|
property. Create calls <var>SetInitialBounds</var> to resize the control
|
|
using the values returned from <var>GetControlClassDefaultSize</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomGroupBox.GetControlClassDefaultSize"/>
|
|
<link id="#lcl.controls.TControl.ControlStyle">TControl.ControlStyle</link>
|
|
<link id="#lcl.controls.TControl.SetInitialBounds">TControl.SetInitialBounds</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomGroupBox.Create.AOwner">
|
|
<short>Owner of the class instance.</short>
|
|
</element>
|
|
|
|
<element name="TCustomGroupBox.ParentBackground">
|
|
<short>Indicates if the control uses the background from the parent.</short>
|
|
<descr>
|
|
<p>
|
|
The write access specifier is overridden in <var>TCustomGroupBox</var>. It
|
|
calls the inherited method on entry.
|
|
</p>
|
|
<p>
|
|
If <var>AParentBackground</var> is <b>True</b> and ParentColor is
|
|
<b>True</b>, the <var>Color</var> from the <var>Parent</var> control is
|
|
assigned to the <var>Color</var> property. Otherwise, the value
|
|
<var>clDefault</var> is stored in the Color property.
|
|
</p>
|
|
<p>
|
|
The <var>UpdateOpaque</var> method is called to adjust the control style
|
|
flags in the control.
|
|
</p>
|
|
<p>
|
|
The default value for the property is <b>True</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomGroupBox.UpdateOpaque"/>
|
|
<link id="#lcl.controls.TControl.ParentBackground">TControl.ParentBackground</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TGroupBox">
|
|
<short>
|
|
A container that allows a number of objects to be grouped physically and
|
|
conceptually on a form.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TGroupBox</var> is a <var>TCustomGroupBox</var> descendant which
|
|
implements a visual component used to organize related controls into a group.
|
|
It acts as a container for controls added to the component, and is assigned
|
|
as the parent for each control.
|
|
</p>
|
|
<p>
|
|
TGroupBox sets the visibility for properties defined in ancestor classes.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="HowToUseStdCtrls"/>
|
|
<link id="TCustomGroupBox"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TGroupBox.Align" link="#lcl.controls.TControl.Align"/>
|
|
<element name="TGroupBox.Anchors" link="#lcl.controls.TControl.Anchors"/>
|
|
<element name="TGroupBox.AutoSize" link="#lcl.controls.TControl.AutoSize"/>
|
|
<element name="TGroupBox.BidiMode" link="#lcl.controls.TControl.BiDiMode"/>
|
|
<element name="TGroupBox.BorderSpacing" link="#lcl.controls.TControl.BorderSpacing"/>
|
|
<element name="TGroupBox.Caption" link="#lcl.controls.TControl.Caption"/>
|
|
<element name="TGroupBox.ChildSizing" link="#lcl.controls.TWinControl.ChildSizing"/>
|
|
<element name="TGroupBox.ClientHeight" link="#lcl.controls.TControl.ClientHeight"/>
|
|
<element name="TGroupBox.ClientWidth" link="#lcl.controls.TControl.ClientWidth"/>
|
|
<element name="TGroupBox.Color" link="#lcl.controls.TControl.Color"/>
|
|
<element name="TGroupBox.Constraints" link="#lcl.controls.TControl.Constraints"/>
|
|
<element name="TGroupBox.Ctl3D" link="#lcl.controls.TControl.Ctl3D"/>
|
|
<element name="TGroupBox.DockSite" link="#lcl.controls.TWinControl.DockSite"/>
|
|
<element name="TGroupBox.DoubleBuffered" link="#lcl.controls.TWinControl.DoubleBuffered"/>
|
|
<element name="TGroupBox.DragCursor" link="#lcl.controls.TControl.DragCursor"/>
|
|
<element name="TGroupBox.DragKind" link="#lcl.controls.TControl.DragKind"/>
|
|
<element name="TGroupBox.DragMode" link="#lcl.controls.TControl.DragMode"/>
|
|
<element name="TGroupBox.Enabled" link="#lcl.controls.TControl.Enabled"/>
|
|
<element name="TGroupBox.Font" link="#lcl.controls.TControl.Font"/>
|
|
<element name="TGroupBox.ParentBackground" link="#lcl.stdctrls.TCustomGroupBox.ParentBackground"/>
|
|
<element name="TGroupBox.ParentDoubleBuffered" link="#lcl.controls.TWinControl.ParentDoubleBuffered"/>
|
|
<element name="TGroupBox.OnChangeBounds" link="#lcl.controls.TControl.OnChangeBounds"/>
|
|
<element name="TGroupBox.OnClick" link="#lcl.controls.TControl.OnClick"/>
|
|
<element name="TGroupBox.OnContextPopup" link="#lcl.controls.TControl.OnContextPopup"/>
|
|
<element name="TGroupBox.OnDblClick" link="#lcl.controls.TControl.OnDblClick"/>
|
|
<element name="TGroupBox.OnDragDrop" link="#lcl.controls.TControl.OnDragDrop"/>
|
|
<element name="TGroupBox.OnDockDrop" link="#lcl.controls.TWinControl.OnDockDrop"/>
|
|
<element name="TGroupBox.OnDockOver" link="#lcl.controls.TWinControl.OnDockOver"/>
|
|
<element name="TGroupBox.OnDragOver" link="#lcl.controls.TControl.OnDragOver"/>
|
|
<element name="TGroupBox.OnEndDock" link="#lcl.controls.TControl.OnEndDock"/>
|
|
<element name="TGroupBox.OnEndDrag" link="#lcl.controls.TControl.OnEndDrag"/>
|
|
<element name="TGroupBox.OnEnter" link="#lcl.controls.TWinControl.OnEnter"/>
|
|
<element name="TGroupBox.OnExit" link="#lcl.controls.TWinControl.OnExit"/>
|
|
<element name="TGroupBox.OnGetSiteInfo" link="#lcl.controls.TWinControl.OnGetSiteInfo"/>
|
|
<element name="TGroupBox.OnKeyDown" link="#lcl.controls.TWinControl.OnKeyDown"/>
|
|
<element name="TGroupBox.OnKeyPress" link="#lcl.controls.TWinControl.OnKeyPress"/>
|
|
<element name="TGroupBox.OnKeyUp" link="#lcl.controls.TWinControl.OnKeyUp"/>
|
|
<element name="TGroupBox.OnMouseDown" link="#lcl.controls.TControl.OnMouseDown"/>
|
|
<element name="TGroupBox.OnMouseEnter" link="#lcl.controls.TControl.OnMouseEnter"/>
|
|
<element name="TGroupBox.OnMouseLeave" link="#lcl.controls.TControl.OnMouseLeave"/>
|
|
<element name="TGroupBox.OnMouseMove" link="#lcl.controls.TControl.OnMouseMove"/>
|
|
<element name="TGroupBox.OnMouseUp" link="#lcl.controls.TControl.OnMouseUp"/>
|
|
<element name="TGroupBox.OnMouseWheel" link="#lcl.controls.TControl.OnMouseWheel"/>
|
|
<element name="TGroupBox.OnMouseWheelDown" link="#lcl.controls.TControl.OnMouseWheelDown"/>
|
|
<element name="TGroupBox.OnMouseWheelUp" link="#lcl.controls.TControl.OnMouseWheelUp"/>
|
|
<element name="TGroupBox.OnResize" link="#lcl.controls.TControl.OnResize"/>
|
|
<element name="TGroupBox.OnStartDock" link="#lcl.controls.TControl.OnStartDock"/>
|
|
<element name="TGroupBox.OnStartDrag" link="#lcl.controls.TControl.OnStartDrag"/>
|
|
<element name="TGroupBox.OnUnDock" link="#lcl.controls.TWinControl.OnUnDock"/>
|
|
<element name="TGroupBox.OnUTF8KeyPress" link="#lcl.controls.TWinControl.OnUTF8KeyPress"/>
|
|
<element name="TGroupBox.ParentBidiMode" link="#lcl.controls.TControl.ParentBiDiMode"/>
|
|
<element name="TGroupBox.ParentColor" link="#lcl.controls.TControl.ParentColor"/>
|
|
<element name="TGroupBox.ParentCtl3D" link="#lcl.controls.TWinControl.ParentCtl3D"/>
|
|
<element name="TGroupBox.ParentFont" link="#lcl.controls.TControl.ParentFont"/>
|
|
<element name="TGroupBox.ParentShowHint" link="#lcl.controls.TControl.ParentShowHint"/>
|
|
<element name="TGroupBox.PopupMenu" link="#lcl.controls.TControl.PopupMenu"/>
|
|
<element name="TGroupBox.ShowHint" link="#lcl.controls.TControl.ShowHint"/>
|
|
<element name="TGroupBox.TabOrder" link="#lcl.controls.TWinControl.TabOrder"/>
|
|
<element name="TGroupBox.TabStop" link="#lcl.controls.TWinControl.TabStop"/>
|
|
<element name="TGroupBox.Visible" link="#lcl.controls.TControl.Visible"/>
|
|
|
|
<element name="TEmulatedTextHintStatus">
|
|
<short>Status values for an emulated TextHint display in a control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TEmulatedTextHintStatus</var> is an enumerated type with values which
|
|
indicate the status for an emulated TextHint display in a control.
|
|
TEmulatedTextHintStatus is the type used for the
|
|
<var>EmulatedTextHintStatus</var> property in both <var>TCustomComboBox</var>
|
|
and <var>TCustomEdit</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.EmulatedTextHintStatus"/>
|
|
<link id="TCustomComboBox.EmulatedTextHintStatus"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TEmulatedTextHintStatus.thsHidden">
|
|
<short>An emulated TextHint not currently displayed for the control.</short>
|
|
</element>
|
|
<element name="TEmulatedTextHintStatus.thsShowing">
|
|
<short>
|
|
An emulated TextHint is currently being shown for the control. The value for
|
|
control has been temporarily set to the value in TextHint.
|
|
</short>
|
|
</element>
|
|
<element name="TEmulatedTextHintStatus.thsChanging">
|
|
<short>
|
|
The emulated TextHint is being displayed. Occurs while the HintFont is being
|
|
created, and the hint text value and password character are passed to the
|
|
widgetset class. Changes to thsShowing when the actions have been completed.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TComboBoxAutoCompleteTextOption">
|
|
<short>
|
|
Defines the behavior of the <var>AutoComplete</var> feature in a combo-box
|
|
control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TComboBoxAutoCompleteTextOption</var> is an enumerated type with values
|
|
which control the auto-completion features and behaviors in combo-box
|
|
controls. Values from the enumeration are stored in the
|
|
<var>TComboBoxAutoCompleteText</var> type used in the
|
|
<var>AutoCompleteText</var> property in <var>TCustomComboBox</var> and
|
|
descendent classes.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TComboBoxAutoCompleteText"/>
|
|
<link id="TCustomComboBox.AutoCompleteText"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TComboBoxAutoCompleteTextOption.cbactEnabled">
|
|
<short>Enable Auto-Completion features.</short>
|
|
</element>
|
|
<element name="TComboBoxAutoCompleteTextOption.cbactEndOfLineComplete">
|
|
<short>
|
|
Perform Auto-Complete only when cursor is at the end of the string.
|
|
</short>
|
|
</element>
|
|
<element name="TComboBoxAutoCompleteTextOption.cbactRetainPrefixCase">
|
|
<short>
|
|
Retains the case of characters user has typed. This option has no effect if
|
|
cbactEndOfLineComplete is not set.
|
|
</short>
|
|
</element>
|
|
<element name="TComboBoxAutoCompleteTextOption.cbactSearchCaseSensitive">
|
|
<short>Search for the completion string with case sensitivity.</short>
|
|
</element>
|
|
<element name="TComboBoxAutoCompleteTextOption.cbactSearchAscending">
|
|
<short>
|
|
Search completion strings in ascending order when set. Otherwise, search in
|
|
descending order.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TComboBoxAutoCompleteText">
|
|
<short>Set of <var>TComboBoxAutoCompleteTextOption</var> values.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TComboBoxAutoCompleteText</var> is a set type used to store zero (0) or
|
|
more values from the <var>TComboBoxAutoCompleteTextOption</var> enumeration.
|
|
TComboBoxAutoCompleteText is the type used to implement the
|
|
<var>AutoCompleteText</var> property in <var>TCustomComboBox</var> and
|
|
descendent classes. It is also the type used for the
|
|
<var>DefaultComboBoxAutoCompleteText</var> constant which defines the default
|
|
values used in combo-box controls.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TComboBoxAutoCompleteTextOption"/>
|
|
<link id="TCustomComboBox.AutoCompleteText"/>
|
|
<link id="DefaultComboBoxAutoCompleteText"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="DefaultComboBoxAutoCompleteText">
|
|
<short>
|
|
Default values for the AutoCompleteText property in combo-box controls.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>DefaultComboBoxAutoCompleteText</var> is a constant which contains the
|
|
set of default values used in the <var>AutoCompleteText</var> property in
|
|
combo-box controls. DefaultComboBoxAutoCompleteText is assigned to the
|
|
property in the constructor for the class instance.
|
|
</p>
|
|
<p>
|
|
DefaultComboBoxAutoCompleteText contains the following values from the
|
|
<var>TComboBoxAutoCompleteTextOption</var> enumeration:
|
|
</p>
|
|
<ul>
|
|
<li>cbactEndOfLineComplete</li>
|
|
<li>cbactSearchAscending</li>
|
|
</ul>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TComboBoxAutoCompleteTextOption"/>
|
|
<link id="TCustomComboBox.AutoCompleteText"/>
|
|
<link id="TCustomComboBox.Create"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TComboBoxStyle">
|
|
<short>The display style available for combo-box controls.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TComboBoxStyle</var> is an enumerated type with values which control the
|
|
display style for combo-box controls. TComboBoxStyle is the type used for the
|
|
<var>Style</var> property in <var>TCustomComboBox</var> and descendent
|
|
classes.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Style"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TComboBoxStyle.csDropDown">
|
|
<short>
|
|
The combo-box has an edit control and a button to open and close the
|
|
drop-down list. This is the default value used for the control.
|
|
</short>
|
|
</element>
|
|
<element name="TComboBoxStyle.csSimple">
|
|
<short>
|
|
The combo-box has an edit control and a list box which is always visible.
|
|
</short>
|
|
</element>
|
|
<element name="TComboBoxStyle.csDropDownList">
|
|
<short>
|
|
The combo-box has a drop-down list for selecting an entry. The selected value
|
|
is displayed like a label and is not editable.
|
|
</short>
|
|
</element>
|
|
<element name="TComboBoxStyle.csOwnerDrawFixed">
|
|
<short>
|
|
Similar to csDropDownList, but is owner-drawn with a fixed height for items
|
|
in the list.
|
|
</short>
|
|
</element>
|
|
<element name="TComboBoxStyle.csOwnerDrawVariable">
|
|
<short>
|
|
The drop-down list elements are owner-drawn and can have a variable height
|
|
for items in the list.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TComboBoxStyleHelper">
|
|
<short>Helper for the TComboBoxStyle type.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TComboBoxStyleHelper</var> is a type helper for
|
|
<var>TComboBoxStyle</var>. TComboBoxStyleHelper provides convenience methods
|
|
used to examine, adjust, or translate values in the TComboBoxStyle
|
|
enumeration.
|
|
</p>
|
|
<p>
|
|
For example:
|
|
</p>
|
|
<code>
|
|
// does the style include an edit box?
|
|
if AComboBox.Style.HasEditBox then DoSomething;
|
|
|
|
// does the style use owner-draw?
|
|
if AComboBox.Style.IsOwnerDrawn then DoSomething;
|
|
|
|
// does the style use variable height items?
|
|
if AComboBox.Style.IsVariable then DoSomething;
|
|
|
|
// toggle the edit box visibility and use in the current style
|
|
AComboBox.Style := AComboBox.Style.SetEditBox(False);
|
|
</code>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="TComboBoxStyle"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TComboBoxStyleHelper.HasEditBox">
|
|
<short>Determines if the style includes an edit box.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TComboBoxStyleHelper.HasEditBox.Result">
|
|
<short><b>True</b> if an selected item value is editable.</short>
|
|
</element>
|
|
|
|
<element name="TComboBoxStyleHelper.SetEditBox">
|
|
<short>Enables or disables an edit box according to the current style.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TComboBoxStyleHelper.SetEditBox.Result">
|
|
<short>Style values after adding or removing the edit box.</short>
|
|
</element>
|
|
<element name="TComboBoxStyleHelper.SetEditBox.AHasEditBox">
|
|
<short>
|
|
<b>True</b> enables the edit box; <b>False</b> disables the edit box.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TComboBoxStyleHelper.IsOwnerDrawn">
|
|
<short>Indicates if the combo-box control is owner-drawn.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TComboBoxStyleHelper.IsOwnerDrawn.Result">
|
|
<short><b>True</b> if the style includes an owner-drawn option.</short>
|
|
</element>
|
|
|
|
<element name="TComboBoxStyleHelper.IsVariable">
|
|
<short>
|
|
Indicates if list items can have a variable height in the combo-box control.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TComboBoxStyleHelper.IsVariable.Result">
|
|
<short>
|
|
<b>True</b> when the option is included for variable height list items.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TOwnerDrawState">
|
|
<short>Alias for the TOwnerDrawState type in <file>lcltype.pp</file>.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TOwnerDrawState</var> instances are passed as an argument to methods
|
|
which draw list items in controls, like <var>TCustomComboBox.DrawItem</var>
|
|
and <var>TCustomListBox.DrawItem</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.DrawItem"/>
|
|
<link id="TCustomListBox.DrawItem"/>
|
|
<link id="#lcl.lcltype.TOwnerDrawState">TOwnerDrawState</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TDrawItemEvent">
|
|
<short>
|
|
Specifies an event handler used to paint a single item in an owner-drawn list
|
|
box or combo-box.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TDrawItemEvent</var> is an object procedure type which specifies an
|
|
event handler signalled to paint an single item in a owner-drawn list box or
|
|
combo-box control. Arguments passed to the event handler identify the
|
|
control, the index for the list item, the canvas coordinates, and the drawing
|
|
state for the operation. The event handler is responsible for rendering the
|
|
list item to its control in its entirety when the control uses owner-drawn
|
|
style settings.
|
|
</p>
|
|
<p>
|
|
TDrawItemEvent is the type used to implement the <var>OnDrawItem</var>
|
|
property in <var>TCustomComboBox</var> and <var>TCustomListBox</var>. An
|
|
application must implement and assign an object procedure using the signature
|
|
for the handler to respond to the event notification.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.OnDrawItem"/>
|
|
<link id="TCustomListBox.OnDrawItem"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TDrawItemEvent.Control">
|
|
<short>The control for the owner-drawn operation.</short>
|
|
</element>
|
|
<element name="TDrawItemEvent.Index">
|
|
<short>Index of the list item to draw.</short>
|
|
</element>
|
|
<element name="TDrawItemEvent.ARect">
|
|
<short>The Canvas rectangle for the list item.</short>
|
|
</element>
|
|
<element name="TDrawItemEvent.State">
|
|
<short>Flags describing the drawing state for the list item.</short>
|
|
</element>
|
|
|
|
<element name="TMeasureItemEvent">
|
|
<short>
|
|
Specifies an event handler used to get the Height for a single item in an
|
|
owner-drawn list box or combo-box.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TMeasureItemEvent</var> is an object procedure type which specifies an
|
|
event handler signalled to get the height for a single item in an owner-drawn
|
|
list box or combo-box control. Arguments passed to the handler include the
|
|
control for the event notification, the index position for the item measured
|
|
in the handler, and the derived height for the item.
|
|
</p>
|
|
<p>
|
|
TMeasureItemEvent is the type used for the <var>OnMeasureItem</var> property
|
|
in <var>TCustomComboBox</var> and <var>TCustomListBox</var>. An application
|
|
must implement and assign a procedure using the signature for the handler to
|
|
respond to the event notification. The handler should account for variable
|
|
height items when enabled in settings for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.OnMeasureItem"/>
|
|
<link id="TCustomListBox.OnMeasureItem"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TMeasureItemEvent.Control">
|
|
<short>The list box or combo-box control.</short>
|
|
</element>
|
|
<element name="TMeasureItemEvent.Index">
|
|
<short>Index of the list item to measure.</short>
|
|
</element>
|
|
<element name="TMeasureItemEvent.AHeight">
|
|
<short>Height of the list item in pixels.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox">
|
|
<short>The base class for combo-box components.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TCustomComboBox</var> is a <var>TWinControl</var> descendant which
|
|
implements the base class for combo-box components in the LCL (Lazarus
|
|
Component Library).
|
|
</p>
|
|
<p>
|
|
A combo-box is visually represented as an edit control and a scrollable list
|
|
of items which can be selected. The list can be always visible, or opened
|
|
when needed using a drop-down indicator. In addition, the items in the
|
|
control be drawn using using the built-in mechanisms for the widgetset class
|
|
or using an owner-drawn style.
|
|
</p>
|
|
<p>
|
|
Despite similarities in appearance to <var>TCustomEdit</var> and
|
|
<var>TCustomList</var>, the class inherits no properties from these classes
|
|
(Delphi compatible).
|
|
</p>
|
|
<p>
|
|
Use the <var>Style</var> property to control the display style and drawing
|
|
mechanism enabled for Items in the control.
|
|
</p>
|
|
<p>
|
|
Use properties like <var>AutoComplete</var>, <var>AutoCompleteText</var>, and
|
|
<var>AutoDropDown</var> to control the behavior of the edit field or
|
|
drop-down list in the control.
|
|
</p>
|
|
<p>
|
|
Use <var>Items</var> to access existing list items defined the control. Use
|
|
<var>AddItem</var> or <var>AddHistoryItem</var> to add entries to the list
|
|
items in the control. Use <var>OnGetItems</var> to dynamically populate the
|
|
Items in the control when the drop-down list is displayed.
|
|
</p>
|
|
<p>
|
|
Do not create instances of TCustomComboBox. Use one of the descendent
|
|
classes, like <var>TComboBox</var> or <var>TComboBoxEx</var>.
|
|
</p>
|
|
<remark>
|
|
The Height property in TCustomComboBox / TComboBox cannot be changed for some
|
|
platforms, including Windows and macOS Carbon. It is best to set AutoSize to
|
|
<b>True</b> to ensure consistent size handling on the supported platforms.
|
|
</remark>
|
|
</descr>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.FArrowKeysTraverseList"/>
|
|
<element name="TCustomComboBox.FAutoCompleteText"/>
|
|
<element name="TCustomComboBox.FAutoSelect"/>
|
|
<element name="TCustomComboBox.FAutoSelected"/>
|
|
<element name="TCustomComboBox.FAutoDropDown"/>
|
|
<element name="TCustomComboBox.FCanvas"/>
|
|
<element name="TCustomComboBox.FCharCase"/>
|
|
<element name="TCustomComboBox.FDropDownCount"/>
|
|
<element name="TCustomComboBox.FDroppedDown"/>
|
|
<element name="TCustomComboBox.FEditingDone"/>
|
|
<element name="TCustomComboBox.FEmulatedTextHintStatus"/>
|
|
<element name="TCustomComboBox.FItemHeight"/>
|
|
<element name="TCustomComboBox.FItemIndex"/>
|
|
<element name="TCustomComboBox.FItemWidth"/>
|
|
<element name="TCustomComboBox.FItems"/>
|
|
<element name="TCustomComboBox.FMaxLength"/>
|
|
<element name="TCustomComboBox.FOnChange"/>
|
|
<element name="TCustomComboBox.FOnCloseUp"/>
|
|
<element name="TCustomComboBox.FOnDrawItem"/>
|
|
<element name="TCustomComboBox.FOnDropDown"/>
|
|
<element name="TCustomComboBox.FOnGetItems"/>
|
|
<element name="TCustomComboBox.FOnMeasureItem"/>
|
|
<element name="TCustomComboBox.FOnSelect"/>
|
|
<element name="TCustomComboBox.FReadOnly"/>
|
|
|
|
<element name="TCustomComboBox.FReturnArrowState">
|
|
<short>
|
|
Used internally, to return the state of arrow keys from temporary change.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.FSelLength"/>
|
|
<element name="TCustomComboBox.FSelStart"/>
|
|
<element name="TCustomComboBox.FSorted"/>
|
|
<element name="TCustomComboBox.FStyle"/>
|
|
<element name="TCustomComboBox.FTextHint"/>
|
|
|
|
<element name="TCustomComboBox.GetAutoComplete">
|
|
<short>Gets the value for the AutoComplete property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.AutoComplete"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.GetAutoComplete.Result">
|
|
<short>Value for the AutoComplete property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.GetDroppedDown">
|
|
<short>Gets the value for the DroppedDown property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.DroppedDown"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.GetDroppedDown.Result">
|
|
<short>Value for the DroppedDown property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.GetItemWidth">
|
|
<short>Gets the value for the ItemWidth property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.ItemWidth"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.GetItemWidth.Result">
|
|
<short>Value for the ItemWidth property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetAutoComplete">
|
|
<short>Sets the value for the AutoComplete property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.AutoComplete"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetAutoComplete.AValue">
|
|
<short>New value for the AutoComplete property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetArrowKeysTraverseList">
|
|
<short>Sets the value for the ArrowKeysTraverseList property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.ArrowKeysTraverseList"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetArrowKeysTraverseList.Value">
|
|
<short>New value for the ArrowKeysTraverseList property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetItemWidth">
|
|
<short>Sets the value for the ItemWidth property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.ItemWidth"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetItemWidth.AValue">
|
|
<short>New value for the ItemWidth property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetCharCase">
|
|
<short>Sets the value for the CharCase property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.CharCase"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetCharCase.eccCharCase">
|
|
<short>New value for the CharCase property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetReadOnly">
|
|
<short>Sets the value for the ReadOnly property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.ReadOnly"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetReadOnly.AValue">
|
|
<short>New value for the ReadOnly property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetTextHint">
|
|
<short>Sets the value for the TextHint property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.TextHint"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetTextHint.AValue">
|
|
<short>New value for the TextHint property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.ShowEmulatedTextHintIfYouCan">
|
|
<short>Tries to display an emulated TextHint for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ShowEmulatedTextHintIfYouCan</var> is a method which attempts to display
|
|
an emulated <var>TextHint</var> for the control. ShowEmulatedTextHintIfYouCan
|
|
calls <var>CanShowEmulatedTextHint</var> to determine if the control requires
|
|
an emulated TextHint display, and is in a state which allows it. If
|
|
CanShowEmulatedTextHint returns <b>True</b>, the
|
|
<var>ShowEmulatedTextHint</var> method is called to display the TextHint.
|
|
</p>
|
|
<p>
|
|
ShowEmulatedTextHintIfYouCan is called from the implementation of the
|
|
<var>InitializeWnd</var> and <var>WMKillFocus</var> methods, and when a new
|
|
value is assigned to the TextHint property.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.TextHint"/>
|
|
<link id="TCustomComboBox.CanShowEmulatedTextHint"/>
|
|
<link id="TCustomComboBox.ShowEmulatedTextHint"/>
|
|
<link id="TCustomComboBox.WMKillFocus"/>
|
|
<link id="TCustomComboBox.InitializeWnd"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.ShowEmulatedTextHint">
|
|
<short>Displays an emulated TextHint for the control.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.TextHint"/>
|
|
<link id="TCustomComboBox.Text"/>
|
|
<link id="TCustomComboBox.EmulatedTextHintStatus"/>
|
|
<link id="#lcl.controls.TControl.Font">TControl.Font</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.HideEmulatedTextHint">
|
|
<short>Hides an emulated TextHint display for the control.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.UpdateSorted">
|
|
<short>Performs actions needed when the Sorted property is changed.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Sorted"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.LMDrawListItem">
|
|
<short>Handler for custom drawing an item; calls DrawItem.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomComboBox.LMDrawListItem.TheMessage">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.LMMeasureItem">
|
|
<short>
|
|
Determines the height of an item using MeasureItem in variable owner-draw
|
|
mode.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomComboBox.LMMeasureItem.TheMessage">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.LMSelChange">
|
|
<short>Handles selection change messages for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>LMSelChange</var> is a method used to handle a <var>LM_CHANGED</var>
|
|
message for the control. No actions are performed in the method during
|
|
component streaming, when the control is freed, or at design-time.
|
|
</p>
|
|
<p>
|
|
<var>LMSelChange</var> calls the <var>Select</var> method to signal the
|
|
<var>OnSelect</var> event handler (when assigned).
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Select"/>
|
|
<link id="TCustomComboBox.OnSelect"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.LMSelChange.TheMessage">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.CNCommand">
|
|
<short>Handles a CN_COMMAND notification message for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>CNCommand</var> is a method used to handle a <var>CN_COMMAND</var>
|
|
control notification message for the control. CNCommand examines
|
|
<var>TheMessage</var> to determine the actions needed for the NotifyCode in
|
|
the message.
|
|
</p>
|
|
<p>
|
|
When NotifyCode is <var>CBN_DROPDOWN</var>, the following actions are
|
|
performed:
|
|
</p>
|
|
<ul>
|
|
<li>DroppedDown is set to <b>True</b>.</li>
|
|
<li>Calls DropDown to signal the OnDropDown event handler (when
|
|
assigned).</li>
|
|
<li>Calls AdjustDropDown to configure the height and width for the drop down
|
|
list.</li>
|
|
</ul>
|
|
<p>
|
|
When NotifyCode is <var>CBN_CLOSEUP</var>, the following actions are
|
|
performed:
|
|
</p>
|
|
<ul>
|
|
<li>DroppedDown is set to <b>False</b>.</li>
|
|
<li>Calls CloseUp to signal the OnCloseUp event handler (when assigned).</li>
|
|
</ul>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomComboBox.CNCommand.TheMessage">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.WMChar">
|
|
<short>Handles LM_CHAR window messages for the control.</short>
|
|
<descr>
|
|
<p>
|
|
Prevents ordinary characters from triggering the accelerator key for the
|
|
control.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomComboBox.WMChar.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.WMKillFocus">
|
|
<short>Implements a handler for the LM_KILLFOCUS message.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomComboBox.WMKillFocus.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.WMSetFocus">
|
|
<short>Implements a handler for the LM_SETFOCUS message.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomComboBox.WMSetFocus.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
|
|
|
|
<element name="TCustomComboBox.CanShowEmulatedTextHint">
|
|
<short>
|
|
Indicates whether an emulated TextHint can be displayed for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>CanShowEmulatedTextHint</var> is a <var>Boolean</var> function which
|
|
indicates whether an emulated text hint can be displayed for the control.
|
|
Emulated text hints are the fallback mechanism used when text hints are not
|
|
natively supported for a platform / widgetset.
|
|
</p>
|
|
<p>
|
|
The return value is <b>True</b> when <b>all</b> of the following conditions
|
|
are met:
|
|
</p>
|
|
<ul>
|
|
<li>A Handle has been allocated for the widgetset class instance.</li>
|
|
<li>Text hints are not natively supported as an LCL capability for the
|
|
platform.</li>
|
|
<li>The ComponentState property does not contain csDesigning or
|
|
csLoading.</li>
|
|
<li>TextHint is not an empty string value.</li>
|
|
<li>Text is an empty string value.</li>
|
|
<li>The control is not Focused.</li>
|
|
</ul>
|
|
<p>
|
|
CanShowEmulatedTextHint is called during execution of the InitializeWnd
|
|
method, when the LM_KILLFOCUS window message is handled for the control, and
|
|
when a new value is assigned to the TextHint property.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomComboBox.CanShowEmulatedTextHint.Result">
|
|
<short>
|
|
<b>True</b> when emulated TextHints are used, and the control state allows
|
|
the hint display.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.CreateParams">
|
|
<short>
|
|
Updates the specified creation parameters to include additional flags for the
|
|
control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>CreateParams</var> is an overridden method in
|
|
<var>TCustomComboBox</var>, and calls the inherited method on entry.
|
|
CreateParams ensures that the style information in <var>Params</var> is
|
|
updated to include constants needed to represent values in the
|
|
<var>Style</var> property for the control. The following constants are also
|
|
included:
|
|
</p>
|
|
<ul>
|
|
<li>WS_VSCROLL</li>
|
|
<li>CBS_AUTOHSCROLL</li>
|
|
<li>CBS_HASSTRINGS</li>
|
|
</ul>
|
|
<p>
|
|
When <var>Sorted</var> is set to <b>True</b>, the value CBS_SORT is also
|
|
included in the style information in Params.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="TCustomComboBox.Sorted"/>
|
|
<link id="#lcl.controls.TWinControl.CreateParams">TWinControl.CreateParams</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.CreateParams.Params">
|
|
<short>Creation parameters updated in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.InitializeWnd">
|
|
<short>
|
|
Synchronizes the control and its widgetset class instance when the handle is
|
|
created.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>InitializeWnd</var> is overridden in <b>TCustomComboBox</b> to ensure
|
|
that the widgetset class and the current class instance are synchronized.
|
|
InitializeWnd calls the inherited method on entry.
|
|
</p>
|
|
<p>
|
|
InitializeWnd gets the string values for list items stored in the widgetset
|
|
class instance (when present), and applies them to the <var>Items</var>
|
|
property. The <var>Sorted</var> property in the control is applied to the list
|
|
items provided by the widget.
|
|
</p>
|
|
<p>
|
|
Other property values are forwarded <b>to</b> the widgetset class
|
|
instance, including:
|
|
</p>
|
|
<ul>
|
|
<li>ArrowKeysTraverseList</li>
|
|
<li>DropDownCount</li>
|
|
<li>ItemIndex</li>
|
|
<li>MaxLength</li>
|
|
<li>ReadOnly</li>
|
|
<li>Style</li>
|
|
</ul>
|
|
<p>
|
|
Values in <var>SelStart</var> and <var>SelLength</var> are re-applied to
|
|
update the edit box in the control to reflect any changes to property values.
|
|
</p>
|
|
<p>
|
|
InitializeWnd is called from CreateWnd after the Window handle has been
|
|
allocated, and before any child handles are allocated.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.ItemIndex"/>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="TCustomComboBox.ReadOnly"/>
|
|
<link id="TCustomComboBox.MaxLength"/>
|
|
<link id="TCustomComboBox.DropDownCount"/>
|
|
<link id="TCustomComboBox.ArrowKeysTraverseList"/>
|
|
<link id="#lcl.controls.TWinControl.InitializeWnd">TWinControl.InitializeWnd</link>
|
|
<link id="#lcl.controls.TWinControl.CreateWnd">TWinControl.CreateWnd</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.DestroyWnd">
|
|
<short>Destroys the handle for the control (and its children).</short>
|
|
<descr>
|
|
<p>
|
|
<var>DestroyWnd</var> is an overridden method in TCustomComboBox used to
|
|
destroy the handle for the windowed control. This occurs when the control is
|
|
freed, and when the handle is re-created in the widgetset class. DestroyWnd
|
|
ensures that values for the ItemIndex and Items properties are retrieved from
|
|
the widgetset class before it is destroyed or re-created. The value in Sorted
|
|
is applied to the Items retrieved from the widgetset class.
|
|
</p>
|
|
<p>
|
|
DestroyWnd calls the inherited method prior to exit.
|
|
</p>
|
|
</descr>
|
|
<errors>
|
|
DestroyWnd calls <var>RaiseGDBException</var> to raise a catchable debugger
|
|
exception if a handle has not been allocated for the control.
|
|
</errors>
|
|
<seealso>
|
|
<link id="TCustomComboBox.ItemIndex"/>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.Sorted"/>
|
|
<link id="#lcl.controls.TWinControl.DestroyWnd">TWinControl.DestroyWnd</link>
|
|
<link id="#lcl.lclproc.RaiseGDBException">RaiseGDBException</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.DoAutoCompleteSelect">
|
|
<short>
|
|
Selects an item in the control when auto-complete is enabled and activated by
|
|
a key event.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
Calls the <var>Select</var> method to signal the <var>OnSelect</var> event
|
|
handler (when assigned). DoAutoCompleteSelect is called from the
|
|
<var>KeyUp</var> method when auto-completion has enabled in the
|
|
<var>AutoCompleteText</var> property, and an alphanumeric key is handled in
|
|
the method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.AutoCompleteText"/>
|
|
<link id="TCustomComboBox.KeyUp"/>
|
|
<link id="TCustomComboBox.OnSelect"/>
|
|
<link id="TCustomComboBox.Select"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.DoEnter">
|
|
<short>Updates the control when the Enter key is applied.</short>
|
|
<descr>
|
|
<p>
|
|
<var>DoEnter</var> is an overridden method used to update the edit and list
|
|
box when the <b>Enter</b> or <b>Return</b> key is handled in messages to the
|
|
control. The inherited method is called to signal the <var>OnEnter</var>
|
|
event handler (when assigned).
|
|
</p>
|
|
<p>
|
|
DoEnter uses the value in <var>Style</var> to determine if an edit box is
|
|
enabled for the control. If an edit box is <b>not</b> used, no additional
|
|
actions are performed in the method.
|
|
</p>
|
|
<p>
|
|
When <var>AutoSelect</var> is enabled, the <var>SelectAll</var> method is
|
|
called to select the text in the edit box and to locate the entry in the
|
|
<var>Items</var> for the control. <var>AutoSelected</var> is updated to
|
|
indicate if <var>SelText</var> matches the value in Text.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.AutoSelect"/>
|
|
<link id="TCustomComboBox.AutoSelected"/>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.SelectAll"/>
|
|
<link id="TCustomComboBox.SelText"/>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="TCustomComboBox.Text"/>
|
|
<link id="#lcl.controls.TWinControl.DoEnter">TWinControl.DoEnter</link>
|
|
<link id="#lcl.controls.TWinControl.OnEnter">TWinControl.OnEnter</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.DoExit">
|
|
<short>
|
|
Updates the control when the CM_EXIT control message is handled.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>DoExit</var> is an overridden method in <var>TCustomComboBox</var> used
|
|
to perform actions needed when the <b>CM_EXIT</b> control message is handled
|
|
for the control. DoExit sets the value in <var>AutoSelected</var> to
|
|
<b>False</b>, and calls the inherited method to signal the <var>OnExit</var>
|
|
event handler (when assigned).
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.AutoSelected"/>
|
|
<link id="#lcl.controls.TWinControl.DoExit">TWinControl.DoExit</link>
|
|
<link id="#lcl.controls.TWinControl.OnExit">TWinControl.OnExit</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.DrawItem">
|
|
<short>
|
|
Draws a list item, using the OnDrawItem handler (when assigned).
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>DrawItem</var> is a procedure used to draw a list item defined in the
|
|
<var>Items</var> property. DrawItem is called when the
|
|
<var>LM_DrawListItem</var> message is handled for the control. Arguments
|
|
passed to the method include the position in Items for the value drawn, the
|
|
canvas rectangle where the drawing occurs, and the drawing state for the list
|
|
item.
|
|
</p>
|
|
<p>
|
|
DrawItem signals the <link id="TCustomComboBox.OnDrawItem">OnDrawItem</link>
|
|
handler (when assigned) to perform the drawing operation. Otherwise, default
|
|
painting is performed by filling the background for the Canvas rectangle (if
|
|
needed) and calling the InternalDrawItem routine.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.OnDrawItem"/>
|
|
<link id="TDrawItemEvent"/>
|
|
<link id="TOwnerDrawState"/>
|
|
<link id="#rtl.types.TRect">TRect</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.DrawItem.Index">
|
|
<short>The position for the item drawn in the method.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.DrawItem.ARect">
|
|
<short>The area to paint on the Canvas.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.DrawItem.State">
|
|
<short>The drawing state for the item (selected...).</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.KeyUpAfterInterface">
|
|
<short>Handles key up events forwarded from the LCL interface.</short>
|
|
<descr>
|
|
<p>
|
|
<var>KeyUpAfterInterface</var> is an overridden method in
|
|
<var>TCustomComboBox</var>. It ensures that the EditingDone method is called
|
|
when a <var>VK_RETURN</var> Key code is received from the LCL interface. The
|
|
internal edit completion flag is reset prior to exiting from the method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.EditingDone">TControl.EditingDone</link>
|
|
<link id="#lcl.controls.TControl.OnEditingDone">TControl.OnEditingDone</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.KeyUpAfterInterface.Key">
|
|
<short>Key code examined in the method.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.KeyUpAfterInterface.Shift">
|
|
<short>Shift, Ctrl, or Alt modifier for the key code.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.MeasureItem">
|
|
<short>Gets the height for an item in the drop-down list.</short>
|
|
<descr>
|
|
<p>
|
|
<var>MeasureItem</var> is a procedure used to get the height for an item in
|
|
the drop-down list for the control.
|
|
</p>
|
|
<p>
|
|
MeasureItem is called when the <b>LM_MeasureItem</b> message is handled for
|
|
the control. The value in <var>ItemHeight</var> has already been updated in
|
|
the message handler, and is used for a list box <var>Style</var> that has a
|
|
fixed item height. MeasureItem is called from the message handler when the
|
|
Style uses a variable item height. The derived item height is stored in the
|
|
<var>ItemHeight</var> property when it is a non-zero positive value.
|
|
</p>
|
|
<p>
|
|
MeasureItem signals the <var>OnMeasureItem</var> event handler (when
|
|
assigned) to calculate the height for the specified item. The value in the
|
|
<var>Index</var> argument determines the string value in <var>Items</var>
|
|
used for the calculation. <var>TheHeight</var> is updated with the derived
|
|
height for the list box item. An application must implement the OnMeasureItem
|
|
event handler to calculate the height for variable height items in the
|
|
control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.OnMeasureItem"/>
|
|
<link id="TCustomComboBox.ItemWidth"/>
|
|
<link id="TCustomComboBox.ItemHeight"/>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="#lcl.lmessages.TLMMeasureItem">TLMMeasureItem</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.MeasureItem.Index">
|
|
<short>The index of the item whose height is required.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.MeasureItem.TheHeight">
|
|
<short>
|
|
The height of the item, in pixels, calculated in the OnMeasureItem handler.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.GetControlClassDefaultSize" link="#lcl.controls.TControl.GetControlClassDefaultSize"/>
|
|
<element name="TCustomComboBox.GetControlClassDefaultSize.Result">
|
|
<short>Default size (bounds) for the new class instance.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.LMChanged">
|
|
<short>Handles the LM_CHANGED message for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>LMChanged</var> is a procedure used to handle a <b>LM_CHANGED</b>
|
|
message received for the control. LMChanged occurs when the widgetset class
|
|
calls the LCLSendChangeMsg routine for the control. LMChanged calls the
|
|
<var>Change</var> method to perform the control message and to signal the
|
|
<var>OnChange</var> event handler (when assigned).
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Change"/>
|
|
<link id="TCustomComboBox.OnChange"/>
|
|
<link id="#lcl.controls.TControl.Perform">TControl.Perform</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.LMChanged.Msg">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.CMWantSpecialKey">
|
|
<short>Handles the CM_WANTSPECIALKEY control message for the control.</short>
|
|
<descr>
|
|
<p>
|
|
For the Darwin (macOS) platform, cursor keys (VK_LEFT, VK_RIGHT, VK_UP,
|
|
VK_DOWN) in Message are marked as handled for edit controls.
|
|
</p>
|
|
<p>
|
|
The inherited method is called (for all platforms) prior to exiting from the
|
|
method.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomComboBox.CMWantSpecialKey.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.Change">
|
|
<short>
|
|
Signals the OnChange event handler when the value for the control is changed.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Change</var> is a procedure used to perform actions needed when the
|
|
value for the control is changed. Change is called from the
|
|
<var>LMChanged</var> method used to process the change notification message.
|
|
Change calls the <var>Changed</var> method, inherited from TControl, to
|
|
<var>Perform</var> the control message. The <var>OnChange</var> event handler
|
|
is signalled (when assigned).
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.LMChanged"/>
|
|
<link id="TCustomComboBox.OnChange"/>
|
|
<link id="#lcl.controls.TControl.Changed">TControl.Changed</link>
|
|
<link id="#lcl.controls.TControl.Perform">TControl.Perform</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.Select">
|
|
<short>
|
|
Signals the <var>OnSelect</var> event handler when ItemIndex is changed.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Select</var> is a procedure called when the item selection in the
|
|
drop-down list for the control has changed. This can happen when text is
|
|
entered and auto-completion is enabled, or when a new value is selected from
|
|
the drop-down list.
|
|
</p>
|
|
<p>
|
|
Select signals the <var>OnSelect</var> event handler (when assigned). For
|
|
Delphi compatibility, the event handler is <b>not</b> signalled when
|
|
<var>ItemIndex</var> contains <b>-1</b> (<var>Text</var> is not located in
|
|
the <var>Items</var> for the control).
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.OnSelect"/>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.ItemIndex"/>
|
|
<link id="TCustomComboBox.AutoComplete"/>
|
|
<link id="TCustomComboBox.AutoCompleteText"/>
|
|
<link id="TCustomComboBox.Text"/>
|
|
<link id="TCustomComboBox.SelText"/>
|
|
<link id="TCustomComboBox.SelStart"/>
|
|
<link id="TCustomComboBox.SelLength"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.DropDown">
|
|
<short>Signals the <var>OnDropDown</var> event handler.</short>
|
|
<descr>
|
|
<p>
|
|
<var>DropDown</var> is a procedure called whenever the drop-down list is
|
|
displayed. DropDown is called when a <b>CN_Command</b> message with a
|
|
<b>CBN_DROPDOWN</b> notification code is handled for the control. DropDown
|
|
signals the <var>OnDropDown</var> event handler (when assigned).
|
|
</p>
|
|
<p>
|
|
Use <var>DroppedDown</var> to determine if the drop-down list has been
|
|
displayed.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.CloseUp"/>
|
|
<link id="TCustomComboBox.DroppedDown"/>
|
|
<link id="TCustomComboBox.OnDropDown"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.GetItems">
|
|
<short>Signals the <var>OnGetItems</var> event handler.</short>
|
|
<descr>
|
|
<p>
|
|
<var>GetItems</var> is a procedure used to dynamically populate the values
|
|
stored in the <var>Items</var> property. GetItems signals the
|
|
<var>OnGetItems</var> event handler (when assigned) to perform actions needed
|
|
to fill the Items property. GetItems is called from the
|
|
<var>IntfGetItems</var> method executed when the widgetset class makes its
|
|
drop-down list visible.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.OnGetItems"/>
|
|
<link id="TCustomComboBox.IntfGetItems"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetItems">
|
|
<short>Sets the value for the Items property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Items"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetItems.Value">
|
|
<short>New value for the Items property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.CloseUp">
|
|
<short>Called when the drop-down list is closed.</short>
|
|
<descr>
|
|
<p>
|
|
<var>CloseUp</var> is a method called whenever the drop-down list for the
|
|
control is closed. CloseUp is called when a <b>CN_Command</b> message with a
|
|
<b>CBN_CLOSEUP</b> notification code is received in the control.
|
|
</p>
|
|
<p>
|
|
CloseUp does not perform any actions in the method at design-time, when the
|
|
component is being loaded using LCL streaming, or when the control is freed.
|
|
</p>
|
|
<p>
|
|
CloseUp signals the <var>OnEditingDone</var> event handler when an edit box
|
|
is enabled in the <var>Style</var> property in the control. The
|
|
<var>OnCloseUp</var> event handler is signalled (when assigned).
|
|
</p>
|
|
<p>
|
|
When <var>AutoSelect</var> is enabled, the <var>SelectAll</var> method is
|
|
called and the <var>AutoSelected</var> property is updated.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TComboBox.OnEditingDone"/>
|
|
<link id="TCustomComboBox.OnCloseUp"/>
|
|
<link id="TCustomComboBox.DroppedDown"/>
|
|
<link id="TCustomComboBox.DropDown"/>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="TCustomComboBox.SelectAll"/>
|
|
<link id="TCustomComboBox.AutoSelect"/>
|
|
<link id="TCustomComboBox.AutoSelected"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.AdjustDropDown">
|
|
<short>Adjusts the extent for the drop-down list.</short>
|
|
<descr>
|
|
<p>
|
|
<var>AdjustDropDown</var> is used to adjust the bounds for the drop-list list
|
|
in the control. AdjustDropDown is called when the drop-list becomes visible,
|
|
and when the value in the <var>ItemWidth</var> property is changed.
|
|
</p>
|
|
<p>
|
|
AdjustDropDown does not perform any actions in the method if a handle has not
|
|
been assigned for the control.
|
|
</p>
|
|
<p>
|
|
AdjustDropDown ensures that the value in <var>DropDownCount</var> is applied
|
|
(when needed) to the drop-down list for the control. The minimum height and
|
|
width for the list is calculated using the <var>ItemWidth</var> and
|
|
<var>ItemHeight</var> properties. The dimensions are passed to the widgetset
|
|
class using the SetComboMinDropDownSize routine in the LCL interface.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.ItemWidth"/>
|
|
<link id="TCustomComboBox.ItemHeight"/>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.DropDownCount"/>
|
|
<link id="TCustomComboBox.DropDown"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.DoAutoAdjustLayout">
|
|
<short>
|
|
Performs actions needed to auto-adjust the control using the specified layout
|
|
policy.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>DoAutoAdjustLayout</var> is an overridden method used to apply an
|
|
auto-adjust layout policy to the control. DoAutoAdjustLayout calls the
|
|
inherited method on entry.
|
|
</p>
|
|
<p>
|
|
DoAutoAdjustLayout ensures that the item height for the control is scaled
|
|
using the factor in <var>AYProportion</var> when <var>AMode</var> contains
|
|
the <var>lapAutoAdjustWithoutHorizontalScrolling</var> or
|
|
<var>lapAutoAdjustForDPI</var> layout adjustment policy values.
|
|
</p>
|
|
<p>
|
|
DoAutoAdjustLayout is called from the <var>AutoAdjustLayout</var> method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.DoAutoAdjustLayout">TControl.DoAutoAdjustLayout</link>
|
|
<link id="#lcl.controls.TLayoutAdjustmentPolicy">TLayoutAdjustmentPolicy</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.DoAutoAdjustLayout.AMode">
|
|
<short>Layout adjustment policy applied in the method.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.DoAutoAdjustLayout.AXProportion">
|
|
<short>Factor used to scale horizontal dimensions.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.DoAutoAdjustLayout.AYProportion">
|
|
<short>Factor used to scale vertical dimensions.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.GetItemCount">
|
|
<short>Returns the number of items defined in the drop-down list.</short>
|
|
<descr>
|
|
<p>
|
|
<var>GetItemCount</var> is an <var>Integer</var> function used to get the
|
|
number of values stored in the <var>Items</var> for the control. It is a
|
|
convenience method, and is equivalent to reading the value for the
|
|
<var>Count</var> property in <var>Items</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Items"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.GetItemCount.Result">
|
|
<short>The number of Items defined in the control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.GetItemHeight">
|
|
<short>Gets the value for the ItemHeight property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.ItemHeight"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.GetItemHeight.Result">
|
|
<short>Value for the property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.GetSelLength">
|
|
<short>Gets the value for the SelLength property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.SelLength"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.GetSelLength.Result">
|
|
<short>Value for the property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.GetSelStart">
|
|
<short>Gets the value for the SelStart property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.SelStart"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.GetSelStart.Result">
|
|
<short>Value for the property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.GetSelText">
|
|
<short>Gets the value for the SelText property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.SelText"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.GetSelText.Result">
|
|
<short>Value for the property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.GetItemIndex">
|
|
<short>Gets the value for the ItemIndex property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.ItemIndex"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.GetItemIndex.Result">
|
|
<short>Value for the property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.GetMaxLength">
|
|
<short>Gets the value for the MaxLength property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.MaxLength"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.GetMaxLength.Result">
|
|
<short>Value for the property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetDropDownCount">
|
|
<short>Sets the value for the DropDownCount property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.DropDownCount"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetDropDownCount.AValue">
|
|
<short>New value for the DropDOwnCount property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetDroppedDown">
|
|
<short>Sets the value for the DroppedDown property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.DroppedDown"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetDroppedDown.AValue">
|
|
<short>New value for the DroppedDown property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetItemHeight">
|
|
<short>Sets the value for the ItemHeight property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.ItemHeight"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetItemHeight.AValue">
|
|
<short>New value for the ItemHeight property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetItemIndex">
|
|
<short>Sets the value for the ItemIndex property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.ItemIndex"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetItemIndex.Val">
|
|
<short>New value for the ItemIndex property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetMaxLength">
|
|
<short>Sets the value for the MaxLength property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.MaxLength"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetMaxLength.AValue">
|
|
<short>New value for the MaxLength property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetSelLength">
|
|
<short>Sets the value for the SelLength property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.SelLength"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetSelLength.Val">
|
|
<short>New value for the SelLength property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetSelStart">
|
|
<short>Sets the value for the SelStart property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.SelStart"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetSelStart.Val">
|
|
<short>New value for the SelStart property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetSelText">
|
|
<short>Sets the value for the SelText property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.SelText"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetSelText.Val">
|
|
<short>New value for the SelText property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetSorted">
|
|
<short>Sets the value for the Sorted property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Sorted"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetSorted.Val">
|
|
<short>New value for the Sorted property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SetStyle">
|
|
<short>Sets the value for the Style property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Style"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SetStyle.Val">
|
|
<short>New value for the Style property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.RealGetText">
|
|
<short>Gets the text/caption for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>RealGetText</var> is an overridden method in <var>TCustomComboBox</var>
|
|
which provides additional debugging support in the method. RealGetText
|
|
ensures that a handle has been allocated for the control and the value in
|
|
Text is available in the widgetset class prior to calling the inherited
|
|
method.
|
|
</p>
|
|
<p>
|
|
The return value contains the Caption assigned to the control, or an empty
|
|
string ('') when the control handle is not available.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.RealGetText">TWinControl.RealGetText</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.RealGetText.Result">
|
|
<short>Caption for the control, or an empty string.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.RealSetText">
|
|
<short>
|
|
Updates ItemIndex when the new value for the control is updated.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>RealSetText</var> is an overridden method in <var>TCustomComboBox</var>.
|
|
It ensures that <var>ItemIndex</var> is updated with the ordinal position in
|
|
<var>Items</var> where the <var>AValue</var> argument is found. MatchListItem
|
|
is called to get the position for AValue using the case sensitivity and search
|
|
order settings in the AutoCompleteText. If there are no values stored in
|
|
Items, ItemIndex is set to <b>-1</b>. A visible emulated <var>TextHint</var>
|
|
is hidden when AValue is not an empty string ('').
|
|
</p>
|
|
<p>
|
|
The inherited method is called prior to exit. This causes the widgetset class
|
|
to be updated when its <var>Handle</var> is valid. The value in
|
|
<var>Caption</var> is also updated, and a <b>CM_TEXTCHANGED</b> control
|
|
message is performed for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.ItemIndex"/>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.MatchListItem"/>
|
|
<link id="TCustomComboBox.AutoCompleteText"/>
|
|
<link id="TCustomComboBox.RealGetText"/>
|
|
<link id="TCustomComboBox.RealGetText"/>
|
|
<link id="#lcl.controls.TWinControl.RealSetText">TWinControl.RealSetText</link>
|
|
<link id="#lcl.controls.TWinControl.RealGetText">TWinControl.RealGetText</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.RealSetText.AValue">
|
|
<short>The new value for the control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.KeyDown">
|
|
<short>Filters keys used to traverse the list.</short>
|
|
<descr>
|
|
<p>
|
|
<var>KeyDown</var> is an overridden method in <var>TCustomComboBox</var>.
|
|
KeyDown ensures that keys like Escape, Tab, and Return are handled in the
|
|
manner needed for the <var>Style</var> in the control. If the values in
|
|
<var>Key</var> and <var>Shift</var> are not specifically handled in the
|
|
method, the inherited KeyDown method is called.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="TCustomComboBox.AutoDropDown"/>
|
|
<link id="TCustomComboBox.ArrowKeysTraverseList"/>
|
|
<link id="#lcl.controls.TWinControl.KeyDown">TWinControl.KeyDown</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.KeyDown.Key">
|
|
<short>The pressed key.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.KeyDown.Shift">
|
|
<short>The state of the modifier keys and mouse buttons.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.KeyUp">
|
|
<short>Handles AutoComplete and AutoSelect for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>KeyUp</var> is an overridden method in TCustomComboBox, and calls the
|
|
inherited method on entry.
|
|
</p>
|
|
<p>
|
|
KeyUp ensures that the <b>VK_RETURN</b> key code causes <var>SelectAll</var>
|
|
to be called when <var>AutoCompletion</var> or <var>AutoSelect</var> is
|
|
enabled for the control. <var>AutoSelected</var> is set to <b>True</b> when
|
|
the values in <var>SelText</var> and <var>Text</var> are the same.
|
|
</p>
|
|
<p>
|
|
In addition, alphanumeric key codes are used to perform AutoComplete text
|
|
location using the options enabled in the <var>AutoCompleteText</var>
|
|
property. The values in Text, <var>SelStart</var>, and <var>SelLength</var>
|
|
are updated (when needed) and the <var>Select</var> method is called to
|
|
reflect the operation.
|
|
</p>
|
|
<p>
|
|
KeyUp is called when <var>TLMKeyUp</var> control messages are processed in
|
|
the handlers for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.AutoSelect"/>
|
|
<link id="TCustomComboBox.AutoSelected"/>
|
|
<link id="TCustomComboBox.AutoComplete"/>
|
|
<link id="TCustomComboBox.AutoCompleteText"/>
|
|
<link id="TCustomComboBox.Text"/>
|
|
<link id="TCustomComboBox.SelText"/>
|
|
<link id="TCustomComboBox.SelStart"/>
|
|
<link id="TCustomComboBox.SelLength"/>
|
|
<link id="TCustomComboBox.Select"/>
|
|
<link id="#lcl.controls.TWinControl.KeyUp">TWinControl.KeyUp</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.KeyUp.Key">
|
|
<short>Virtual key code examined in the method.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.KeyUp.Shift">
|
|
<short>Shift, Alt, or Ctrl modifier for the key code.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.UTF8KeyPress">
|
|
<short>
|
|
<var>UTF8KeyPress</var> converts character case if required then calls the
|
|
inherited method.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>UTF8KeyPress</var> is an overridden method, and calls the inherited
|
|
method on entry. The inherited method emulates a UTF-8-encoded keypress. The
|
|
UTF-8 encoding should be used when there is the possibility that input/output
|
|
will occur in any language that requires multiple bytes to represent each
|
|
character, i.e. all languages except English.
|
|
</p>
|
|
<p>
|
|
UTF8KeyPress uses the value in <var>CharCase</var> to determine if the
|
|
character case for <var>UTF8Key</var> is converted:
|
|
</p>
|
|
<dl>
|
|
<dt>ecNormalCase</dt>
|
|
<dd>No conversion is required.</dd>
|
|
<dt>ecLowerCase</dt>
|
|
<dd>Calls UTF8LowerCase to convert the value in UTF8Key.</dd>
|
|
<dt>ecUpperCase</dt>
|
|
<dd>Calls UTF8UpperCase to convert the value in UTF8Key.</dd>
|
|
</dl>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.CharCase"/>
|
|
<link id="#lazutils.lazutf8.UTF8LowerCase">UTF8LowerCase</link>
|
|
<link id="#lazutils.lazutf8.UTF8UpperCase">UTF8UpperCase</link>
|
|
<link id="#lcl.controls.TWinControl.UTF8KeyPress">TWinControl.UTF8KeyPress</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.UTF8KeyPress.UTF8Key">
|
|
<short>UTF-8-encoded character examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.MouseUp">
|
|
<short>
|
|
Highlights the selected text in the control when the left mouse button is
|
|
released.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>MouseUp</var> is an overridden method, and calls the inherited method on
|
|
entry. MouseUp ensures that the selected text in the control is highlighted
|
|
when the Left mouse button is released and <var>AutoSelect</var> is enabled.
|
|
MouseUp calls <var>SelectAll</var> to select the value in the <var>Text</var>
|
|
property in the edit box for the control. The value in
|
|
<var>AutoSelected</var> is set to <b>True</b>.
|
|
</p>
|
|
<p>
|
|
No selection is performed in the method when AutoSelect is set to
|
|
<b>False</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.AutoSelect"/>
|
|
<link id="TCustomComboBox.AutoSelected"/>
|
|
<link id="TCustomComboBox.SelectAll"/>
|
|
<link id="TCustomComboBox.Text"/>
|
|
<link id="TCustomComboBox.SelText"/>
|
|
<link id="TCustomComboBox.SelStart"/>
|
|
<link id="TCustomComboBox.SelLength"/>
|
|
<link id="#lcl.controls.TControl.MouseUp">TControl.MouseUp</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.MouseUp.Button">
|
|
<short>Mouse button for the notification.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.MouseUp.Shift">
|
|
<short>Shift, Alt, or Ctrl modifier for the notification.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.MouseUp.X">
|
|
<short>Horizontal coordinate for the mouse pointer.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.MouseUp.Y">
|
|
<short>Vertical coordinate for the mouse pointer.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SelectItem">
|
|
<short>Selects the list item with the specified text.</short>
|
|
<descr>
|
|
<p>
|
|
<var>SelectItem</var> is a <var>Boolean</var> function used to select the
|
|
list item in the control with the value specified in <var>AnItem</var>. The
|
|
return value is <b>True</b> when the <var>Items</var> property contains an
|
|
entry with the value in <var>AnItem</var>.
|
|
</p>
|
|
<p>
|
|
The value in <var>ItemIndex</var> is updated with the ordinal position in
|
|
Items for the specified value, or <b>-1</b> when AnItem does not exist in
|
|
Items. When the value in ItemIndex is changed, the <var>Click</var> and
|
|
<var>Select</var> methods are called to refresh the control display and to
|
|
signal the <var>OnClick</var> and <var>OnSelect</var> event handlers.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.ItemIndex"/>
|
|
<link id="TCustomComboBox.Select"/>
|
|
<link id="TCustomComboBox.OnSelect"/>
|
|
<link id="#lcl.controls.TControl.Click">TControl.Click</link>
|
|
<link id="#lcl.controls.TControl.OnClick">TControl.OnClick</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.SelectItem.Result">
|
|
<short><b>True</b> when a matching item was found and selected.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.SelectItem.AnItem">
|
|
<short>The text to find in Items.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.ShouldAutoAdjust">
|
|
<short>
|
|
Indicates if the width and/or height for the control can be adjusted by a
|
|
layout policy.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>ShouldAutoAdjust</var> is an overridden method in
|
|
<var>TCustomComboBox</var>. It sets the values in the <var>AWidth</var> and
|
|
<var>AHeight</var> parameters to indicate if the control can adjust the
|
|
bound(s) when a layout policy is applied to the control. <b>True</b>
|
|
indicates the value for the property can be adjusted.
|
|
</p>
|
|
<p>
|
|
ShouldAutoAdjust is used in the implementation of the
|
|
<var>DoAutoAdjustLayout</var> method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.DoAutoAdjustLayout"/>
|
|
<link id="#lcl.controls.TControl.ShouldAutoAdjust">TControl.ShouldAutoAdjust</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.ShouldAutoAdjust.AWidth">
|
|
<short>Always set to <b>True</b> in the method.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.ShouldAutoAdjust.AHeight">
|
|
<short><b>True</b> when AutoSize is not enabled for the control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.ItemHeight">
|
|
<short>The default height of an item in the drop-down for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ItemHeight</var> is an Integer property which contains the height (in
|
|
pixels) used when drawing an item in the drop-down list.
|
|
</p>
|
|
<p>
|
|
The value for the property is retrieved from the widgetset class when not
|
|
already assigned in the class instance, or when using an owner-drawn
|
|
<var>Style</var>. Setting a new value for ItemHeight calls the
|
|
<var>SetItemHeight</var> method in the widgetset class for owner-drawn Styles.
|
|
</p>
|
|
<p>
|
|
The property value is updated when the <var>LM_MeasureItem</var> message is
|
|
handled for the control. When variable height items are enabled in Style, the
|
|
<var>OnMeasureItem</var> event handler must be implemented to calculate the
|
|
height for individual value in <var>Items</var>.
|
|
</p>
|
|
<p>
|
|
<var>ItemHeight</var>, <var>ItemWidth</var>, <var>Items</var>, and
|
|
<var>DropDownCount</var> are used in the <var>AdjustDropDown</var> method to
|
|
determine the dimensions for the drop-down list in the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.OnMeasureItem"/>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.ItemWidth"/>
|
|
<link id="TCustomComboBox.DropDownCount"/>
|
|
<link id="TCustomComboBox.AdjustDropDown"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.ItemWidth">
|
|
<short>The minimum width of the items in the drop-down list.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ItemWidth</var> is an <var>Integer</var> property which contains the
|
|
minimum number of pixels used when displaying the static or drop-down list
|
|
for the control. The default value for the property is 0 (zero).
|
|
</p>
|
|
<p>
|
|
Setting a new value for the property causes the <var>AdjustDropDown</var>
|
|
method to be called to adjust the dimensions for the list to the values in
|
|
<var>ItemHeight</var>, <var>ItemWidth</var>, and <var>DropDownCount</var>.
|
|
</p>
|
|
<p>
|
|
Use <var>ItemHeight</var> to specify the number of pixels required for items
|
|
displayed in the drop-down list for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.DropDownCount"/>
|
|
<link id="TCustomComboBox.ItemHeight"/>
|
|
<link id="TCustomComboBox.AdjustDropDown"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.MaxLength">
|
|
<short>
|
|
The maximum length for text entered in the edit box for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>MaxLength</var> is an <var>Integer</var> property which contains the
|
|
maximum length for a value entered in the <var>Text</var> for the control. It
|
|
controls the number of characters allowed in the edit box, but does not limit
|
|
the length of the value that can be directly assigned to Text. MaxLength is
|
|
passed to and read from the widgetset class when a handle has been assigned
|
|
for the control.
|
|
</p>
|
|
<p>
|
|
The default value for the property is <b>0</b> (zero), and indicates that a
|
|
maximum length has not been specified in the property. Setting the value for
|
|
the property does not alter the existing value in Text.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Text"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.OnChange">
|
|
<short>
|
|
Event handler signalled for user changes to the text in the edit box.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>OnChange</var> is a <var>TNotifyEvent</var> property which implements
|
|
the event handler signalled when the value in the edit box has been changed.
|
|
</p>
|
|
<p>
|
|
The event applies to interactive changes to <var>Text</var> made by the user,
|
|
not those made programmatically. Note that this differs from how other
|
|
OnChange events work. For example: TEdit.OnChange is triggered by text
|
|
changes that occur in code. This event is also triggered when the item
|
|
selection is changed using the drop-down list in the combo-box.
|
|
</p>
|
|
<p>
|
|
OnChange is signalled (when assigned) in the <var>Change</var> method called
|
|
when the control messages are handled in the window procedure. An application
|
|
must implement and assign an object procedure using the signature in
|
|
TNotifyEvent to respond to the event notification.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.OnChange"/>
|
|
<link id="TCustomEdit.Change"/>
|
|
<link id="TCustomEdit.Text"/>
|
|
<link id="#rtl.classes.TNotifyEvent">TNotifyEvent</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.OnCloseUp">
|
|
<short>Handler invoked when the drop-down list closes.</short>
|
|
<descr>
|
|
<p>
|
|
<var>OnCloseUp</var> is a <var>TNotifyEvent</var> property which contains the
|
|
event handler signalled when the drop-down list in the control is hidden or
|
|
closed. It can be used to perform any actions needed in an application, such
|
|
as comparing pre-selection and post-selection values for properties. An
|
|
application must implement and assign an object procedure to the property to
|
|
respond to the event notification.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#rtl.classes.TNotifyEvent">TNotifyEvent</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.OnDrawItem">
|
|
<short>Handler for special painting of an item (in owner-draw mode).</short>
|
|
<descr>
|
|
<p>
|
|
<var>OnDrawItem</var> is a <var>TDrawItemEvent</var> property which contains
|
|
an event handler used to draw an item in the drop-down list for the control.
|
|
OnDrawItem is used when <var>Style</var> contains one of the owner-drawn
|
|
values. See <var>TComboBoxStyle</var> for more information about the
|
|
owner-drawn styles available.
|
|
</p>
|
|
<p>
|
|
OnDrawItem is signalled (when assigned) from the <var>DrawItem</var> method.
|
|
The event handler is responsible for all drawing operations needed to render
|
|
the specified list item. This can include the text and any images or overlays
|
|
drawn for the list item. Use the <var>Canvas</var> property to render the
|
|
list item to the specified coordinate rectangle.
|
|
</p>
|
|
<p>
|
|
If OnDrawItem is not assigned, an internal default drawing routine is called
|
|
to render the list item. It handles filling the canvas rectangle with the
|
|
background for the item, and drawing the item text using the style, layout,
|
|
and alignment defined in the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.DrawItem"/>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="TCustomComboBox.Canvas"/>
|
|
<link id="TDrawItemEvent"/>
|
|
<link id="TComboBoxStyle"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.OnDropDown">
|
|
<short>Handler invoked when the list has dropped down.</short>
|
|
<descr>
|
|
<p>
|
|
<var>OnDropDown</var> is a <var>TNotifyEvent</var> property with the event
|
|
handler signalled when the drop-down list for the control is displayed.
|
|
OnDropDown is signalled (when assigned) from the <var>DropDown</var> method.
|
|
DropDown is called when the <b>CBN_DROPDOWN</b> message is handled for the
|
|
control.
|
|
</p>
|
|
<p>
|
|
Implement and assign an object procedure to the handler to respond to the
|
|
event notification.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="TCustomComboBox.DropDown"/>
|
|
<link id="#rtl.classes.TNotifyEvent">TNotifyEvent</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.OnGetItems">
|
|
<short>Handler invoked when widgetset items list can be populated.</short>
|
|
<descr>
|
|
<p>
|
|
<var>OnGetItems</var> is a <var>TNotifyEvent</var> property with the event
|
|
handler signalled to load the values used in the <var>Items</var> property.
|
|
</p>
|
|
<p>
|
|
OnGetItems is signalled (when assigned) from the <var>GetItems</var> method.
|
|
Some widgetsets, like GTK, call GetItems (via <var>IntfGetItems</var>) just
|
|
before the drop-down list is displayed. Others call GetItems when the handle
|
|
for the control is created. OnGetItems provides one event to handle both
|
|
cases.
|
|
</p>
|
|
<p>
|
|
An application should implement and assign an object procedure to the handler
|
|
to respond to the event notification. The procedure must perform any actions
|
|
needed to load the values for the Items property from an appropriate source.
|
|
</p>
|
|
<p>
|
|
Values can always be stored in the Items property using code at run-time, or
|
|
by entering the values using the Object Inspector at design-time.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.GetItems"/>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.IntfGetItems"/>
|
|
<link id="#rtl.classes.TNotifyEvent">TNotifyEvent</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.OnMeasureItem">
|
|
<short>Handler invoked when the height for an item is needed.</short>
|
|
<descr>
|
|
<p>
|
|
<var>OnMeasureItem</var> is a <var>TMeasureItemEvent</var> property with the
|
|
event handler signalled to get the height for an item displayed in the list
|
|
box for the control.
|
|
</p>
|
|
<p>
|
|
OnMeasureItem is signalled (when assigned) from the <var>MeasureItem</var>
|
|
method. MeasureItem (and OnMeasureItem) are used when the <var>Style</var>
|
|
property indicates that the control uses a variable height for each item
|
|
displayed in the list box. OnMeasureItem occurs when the
|
|
<b>LM_MeasureItem</b> message is handled for the control.
|
|
</p>
|
|
<p>
|
|
Use the <var>Index</var> argument to get the value in <var>Items</var>
|
|
examined in the event handler. Use <var>ItemWidth</var> to determine the
|
|
maximum width allowed for the variable height item. <var>Canvas</var> can be
|
|
used to get text metrics for the <var>Font</var> used in the control. Update
|
|
the <var>AHeight</var> argument with the height calculated for the item.
|
|
</p>
|
|
<p>
|
|
Use <var>ItemHeight</var> for the item height used for fixed height drawing
|
|
styles.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.MeasureItem"/>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="TCustomComboBox.ItemHeight"/>
|
|
<link id="TCustomComboBox.ItemWidth"/>
|
|
<link id="TCustomComboBox.Canvas"/>
|
|
<link id="TMeasureItemEvent"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.OnSelect">
|
|
<short>Handler invoked when an item is selected.</short>
|
|
<descr>
|
|
<p>
|
|
<var>OnSelect</var> is a <var>TNotifyEvent</var> property with the event
|
|
handler signalled when an item is selected in the list box for the control.
|
|
</p>
|
|
<p>
|
|
OnSelect is signalled (when assigned) from the <var>Select</var> method when
|
|
<var>ItemIndex</var> contains a positive non-zero value. Select (and
|
|
subsequently OnSelect) are called from multiple methods in TCustomComboBox.
|
|
<var>SelectItem</var> calls Select when the value in ItemIndex is changed as
|
|
a result of assigning a value to <var>Text</var>. <var>KeyUp</var> calls
|
|
Select when the value in Text is updated by auto-completion features in the
|
|
control. Select is also called when the <b>LM_SelChange</b> message is
|
|
handled for the control.
|
|
</p>
|
|
<p>
|
|
Implement and assign an object procedure to the handler to respond to the
|
|
event notification.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Select"/>
|
|
<link id="TCustomComboBox.SelectItem"/>
|
|
<link id="TCustomComboBox.ItemIndex"/>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.KeyUp"/>
|
|
<link id="#rtl.classes.TNotifyEvent">TNotifyEvent</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.ParentColor">
|
|
<short>Uses the Color from the Parent control, when enabled.</short>
|
|
<descr>
|
|
<p>
|
|
ParentColor determines if the control should use the Color from the Parent
|
|
control, when enabled. The default value for the property is <b>False</b> in
|
|
TCustomComboBox.
|
|
</p>
|
|
<p>
|
|
When this property is <b>True</b>, all changes to the Color of the parent
|
|
will also be applied to the Color of the control, ensuring that they both
|
|
contain same value. If the Color of the control is changed by the
|
|
application, then ParentColor will be automatically set to <b>False</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.ParentColor">TControl.ParentColor</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.Sorted">
|
|
<short>
|
|
Determines whether the list entries are sorted in alphanumeric order.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Sorted</var> is a <var>Boolean</var> property which indicates if values
|
|
in <var>Items</var> are stored and displayed in alphanumeric sort order.
|
|
</p>
|
|
<p>
|
|
Setting this property to <b>True</b> enforces ascending alphanumeric
|
|
case-insensitive sorting of the list. When set to <b>True</b>, new entries
|
|
are added in sort order, and not to the end of the Items list. When a new
|
|
value is assigned to the property, the <var>UpdateSorted</var> method is
|
|
called to set the <var>Sorted</var> property in <var>Items</var> to the
|
|
corresponding value. <var>ItemIndex</var> is also set to the location in
|
|
Items where the value in <var>Text</var> is stored, or <b>-1</b> when not
|
|
found.
|
|
</p>
|
|
<p>
|
|
The default value for the property is <b>False</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.Create">
|
|
<short>Constructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Create</var> is the overridden constructor for the class instance, and
|
|
calls the inherited constructor on entry. Create ensures that resources are
|
|
allocated for members in the class instance. Create sets the default values
|
|
for properties, including the following:
|
|
</p>
|
|
<dl>
|
|
<dt>ControlSyle</dt>
|
|
<dd>Removes csCaptureMouse from the style flags.</dd>
|
|
<dt>DropDownCunt</dt>
|
|
<dd>Set to display 8 items by default.</dd>
|
|
<dt>ArrowKeysTraverseList</dt>
|
|
<dd>Set to <b>True</b> to enable cursor key navigation in the control.</dd>
|
|
<dt>AutoCompleteText</dt>
|
|
<dd>Set to the values in the DefaultComboBoxAutoCompleteText constant.</dd>
|
|
<dt>AutoSelect</dt>
|
|
<dd>Set to <b>True</b>.</dd>
|
|
<dt>CharCase</dt>
|
|
<dd>Set to ecNormal.</dd>
|
|
<dt>AutoSize</dt>
|
|
<dd>
|
|
Set to <b>True</b>. AutoSize must be <b>True</b> by default since some
|
|
widgetsets (win32, wince) ignore the combo-box height and others (gtk2) look
|
|
ugly with a very small height.
|
|
</dd>
|
|
</dl>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Destroy"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.Create.TheOwner">
|
|
<short>Owner of the class instance.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.Destroy">
|
|
<short>Destructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Destroy</var> is the overridden destructor for the class instance.
|
|
Destroy calls <var>DestroyHandle</var> if a handle has been allocated for the
|
|
control. Destroy frees resources allocated for the <var>Canvas</var>
|
|
property, and calls the inherited destructor.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Create"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.IntfGetItems">
|
|
<short>Gets the values in the Items property for the widgetset class.</short>
|
|
<descr>
|
|
<p>
|
|
<var>IntfGetItems</var> is a procedure used to populate the values in the
|
|
<var>Items</var> property. IntfGetItems is called when the widgetset class
|
|
retrieves the values for the items displayed in the control. Some widgetsets
|
|
perform this action when the handle is allocated, or the focus is set for the
|
|
control. Others perform the action when the drop-list for the control is
|
|
displayed.
|
|
</p>
|
|
<p>
|
|
IntfGetItems calls the <var>GetItems</var> method to signal the
|
|
<var>OnGetItems</var> event handler (when assigned).
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.GetItems"/>
|
|
<link id="TCustomComboBox.OnGetItems"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.AddItem">
|
|
<short>
|
|
Adds the specified string (and optional object) to the Items displayed in the
|
|
control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>AddItem</var> is a procedure used to add the specified value (and an
|
|
optional associated object) to the <var>Items</var> in the control. AddItem
|
|
calls the <var>AddObject</var> method in Items to store the values in
|
|
<var>Item</var> and <var>AnObject</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="#rtl.classes.TStrings.AddObject">TStrings.AddObject</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.AddItem.Item">
|
|
<short>The string added to Items.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.AddItem.AnObject">
|
|
<short>The associated object, can be <b>Nil</b>.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.MatchListItem">
|
|
<short>
|
|
Gets the position for the specified value in Items using the AutoCompleteText
|
|
settings for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>MatchListItem</var> is an <var>Integer</var> function used to get the
|
|
ordinal position in Items where the value in <var>AValue</var> is stored.
|
|
</p>
|
|
<p>
|
|
MatchListItem uses the <var>TComboBoxAutoCompleteText</var> settings in
|
|
<var>AutoCompleteText</var> to locate the position for the specified value. If
|
|
cbactSearchCaseSensitive is included in AutoCompleteText, a case-sensitive
|
|
search is used to locate the value. Otherwise, AValue is converted to
|
|
uppercase and a case-insensitive search is performed in Items.
|
|
</p>
|
|
<p>
|
|
The search direction in Items is determined using the cbactSearchAscending
|
|
value in AutoCompleteText. When present, the search starts at the first value
|
|
in Items (position 0) and continues until a match is found or all Items have
|
|
been checked. When omitted, the search starts at the last value in Items
|
|
(Count-1) and continues until a match is found or all Items have been checked.
|
|
</p>
|
|
<p>
|
|
The return value is -1 if Items does not contain any entries (Count=0), if
|
|
AValue is an empty string (''), or AValue is not found in Items using the
|
|
AutoCompleteText settings.
|
|
</p>
|
|
<p>
|
|
MatchListItem is called from the RealSetText method when the edit text for the
|
|
control has been changed.
|
|
</p>
|
|
</descr>
|
|
<version>
|
|
Added in LCL version 3.0.
|
|
</version>
|
|
<seealso>
|
|
<link id="TCustomComboBox.RealSetText"/>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.AutoCompleteText"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.MatchListItem.Result">
|
|
<short>
|
|
Ordinal position in Items for the specified value, or -1 when not found.
|
|
</short>
|
|
</element>
|
|
<element name="TCustomComboBox.MatchListItem.AValue">
|
|
<short>
|
|
Value to locate in the Items for the control.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.AddHistoryItem">
|
|
<short>
|
|
Add an item as the first entry in the history list for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>AddHistoryItem</var> is a procedure used to add the values in
|
|
<var>Item</var> and <var>AnObject</var> to the beginning of the list items
|
|
displayed for the control. AddHistoryItem uses the value in
|
|
<var>CaseSensitive</var> to determine if case is significant when comparing
|
|
the value in Item to the existing value at the beginning of <var>Items</var>.
|
|
</p>
|
|
<p>
|
|
AddHistoryItem calls the <var>InsertObject</var> method in Items to store the
|
|
values at the initial position in the Items list (ordinal position 0). When
|
|
Item exists at another position in Items, it is removed.
|
|
</p>
|
|
<p>
|
|
<var>MaxHistoryCount</var> contains the maximum number of entries allowed in
|
|
the Items property. When the number of entries in Items exceeds the value in
|
|
MaxHistoryCount, the excess is removed from the end of the Items property.
|
|
</p>
|
|
<p>
|
|
When <var>SetText</var> is <b>True</b>, the value in Item is stored to the
|
|
<var>Text</var> property.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.Text"/>
|
|
<link id="#rtl.classes.TStrings.InsertObject">TStrings.InsertObject</link>
|
|
<link id="#rtl.classes.TStrings.Delete">TStrings.Delete</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomComboBox.AddHistoryItem.Item">
|
|
<short>The string to be added to the list.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.AddHistoryItem.AnObject">
|
|
<short>Optional associated object added for the item.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.AddHistoryItem.MaxHistoryCount">
|
|
<short>The maximum number of items that can be added to the history.</short>
|
|
</element>
|
|
<element name="TCustomComboBox.AddHistoryItem.SetAsText">
|
|
<short>
|
|
When <b>True</b> the string also is copied into the edit box for the control.
|
|
</short>
|
|
</element>
|
|
<element name="TCustomComboBox.AddHistoryItem.CaseSensitive">
|
|
<short>
|
|
<b>True</b> means that the list can contain multiple items with the same
|
|
text, differing in case.
|
|
</short>
|
|
</element>
|
|
<element name="TCustomComboBox.AddHistoryItem.AnObject">
|
|
<short>The object associated with the item; can be <b>Nil</b>.</short>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.Clear">
|
|
<short>Removes all items from the list, and clears the edit box.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Clear</var> is a procedure used to remove all values stored in the
|
|
<var>Items</var> property for the control. Clear calls the Clear method in
|
|
Items to removed the strings and any associated objects stored in the
|
|
<var>TStrings</var> property. Clear sets the value in <var>Text</var> to an
|
|
empty string (<b>''</b>) which forces the value in ItemIndex to be changed
|
|
to <b>-1</b>.
|
|
</p>
|
|
<p>
|
|
Use the Clear method in Items to remove all of the the values stored in Items
|
|
but keep the current value in Text.
|
|
</p>
|
|
<p>
|
|
Use ClearSelection to reset the value in ItemIndex and de-select the selected
|
|
value in Items.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.ItemIndex"/>
|
|
<link id="TCustomComboBox.ClearSelection"/>
|
|
<link id="#rtl.classes.TStrings.Clear">TStrings.Clear</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.ClearSelection">
|
|
<short>Removes the item selection in the list box for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ClearSelection</var> is a procedure used to remove the current item
|
|
selection in the list box for the control. This causes the value in
|
|
<var>ItemIndex</var> to be changed to <b>-1</b>, and the value in Text is set
|
|
to an empty string ('').
|
|
</p>
|
|
<p>
|
|
Use SelStart, SelLength, and SelText to access or modify the text selection
|
|
in the edit control. Set <var>SelLength</var> to zero (<b>0</b>) to remove
|
|
the text selection in the edit box.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.ItemIndex"/>
|
|
<link id="TCustomComboBox.SelLength"/>
|
|
<link id="TCustomComboBox.SelStart"/>
|
|
<link id="TCustomComboBox.SelText"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.CharCase">
|
|
<short>
|
|
Indicates the case conversion applied to the value entered in the edit box
|
|
for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>CharCase</var> is a <var>TEditCharCase</var> property which indicates
|
|
the case conversion applied to the value entered in the edit box for the
|
|
control. The default value for the property is <var>ecNormal</var>, and
|
|
indicates that no case conversion is performed.
|
|
</p>
|
|
<p>
|
|
Setting a new value for the property causes the value in <var>Text</var> to
|
|
be converted to the specified case by calling either the
|
|
<var>UTF8LowerCase</var> or the <var>UTF8UpperCase</var> routine. Text is not
|
|
modified when <var>ecNormal</var> is assigned to the property.
|
|
</p>
|
|
<p>
|
|
The value in CharCase is used when the <var>UTF8KeyPress</var> is called to
|
|
apply key press events for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Text"/>
|
|
<link id="TCustomComboBox.UTF8KeyPress"/>
|
|
<link id="#lazutils.lazutf8.UTF8LowerCase">UTF8LowerCase</link>
|
|
<link id="#lazutils.lazutf8.UTF8UpperCase">UTF8UpperCase</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.DroppedDown">
|
|
<short>
|
|
Indicates whether the drop-down list has been displayed.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>DroppedDown</var> is a <var>Boolean</var> property which indicates
|
|
whether the drop-down list for the control has been displayed.
|
|
</p>
|
|
<p>
|
|
Reading the value for the property causes the widgetset class to be queried
|
|
when a handle has been allocated for the control. Otherwise, the stored value
|
|
for the property is used.
|
|
</p>
|
|
<p>
|
|
Setting a new value for the property causes the widgetset class to be
|
|
notified of the changed property value. No actions are performed if a handle
|
|
has not been allocated for the control, or during LCL component streaming.
|
|
Setting this property opens or closes the drop-down list.
|
|
</p>
|
|
<p>
|
|
The value in DroppedDown is maintained when the <var>Style</var> for the
|
|
control is altered, when <b>CBN_DROPDOWN</b> or <b>CBN_CLOSEUP</b> control
|
|
messages are handled, and when key down events are handled which change the
|
|
visibility of the drop-down list.
|
|
</p>
|
|
<remark>
|
|
For the macOS Carbon widgetset, setting DroppedDown to <b>True</b> does not
|
|
cause the drop-down list to be displayed when Style is set to csDropDownList.
|
|
</remark>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="TCustomComboBox.KeyDown"/>
|
|
<link id="TComboBoxStyle"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SelectAll">
|
|
<short>Selects the text content in the edit box for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>SelectAll</var> is a procedure used to select/highlight the
|
|
<var>Text</var> displayed in the edit box for the control. SelectAll requires
|
|
a <var>Style</var> that uses an edit box in the control. No actions are
|
|
performed in the method when Style does not include an enabled edit box.
|
|
</p>
|
|
<p>
|
|
SelectAll sets the value in <var>SelStart</var> to <b>0</b> (zero) to move
|
|
the selection to the beginning of the edit box, and sets <var>SelLength</var>
|
|
to the number of UTF-8-encoded characters in Text. No selection/highlighting
|
|
is performed when Text contains an empty string (<b>''</b>).
|
|
</p>
|
|
<p>
|
|
SelectAll is called from methods like <var>DoEnter</var>, <var>KeyUp</var>,
|
|
<var>CloseUp</var>, and <var>MouseUp</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="TCustomComboBox.Text"/>
|
|
<link id="TCustomComboBox.SelStart"/>
|
|
<link id="TCustomComboBox.SelLength"/>
|
|
<link id="TCustomComboBox.SelText"/>
|
|
<link id="TCustomComboBox.DoEnter"/>
|
|
<link id="TCustomComboBox.KeyUp"/>
|
|
<link id="TCustomComboBox.CloseUp"/>
|
|
<link id="TCustomComboBox.MouseUp"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.AutoComplete">
|
|
<short>Positions the list box using partial text matching.</short>
|
|
<descr>
|
|
<p>
|
|
<var>AutoComplete</var> is a <var>Boolean</var> property which indicates if
|
|
partial text matching is used to locate values in the Items displayed for the
|
|
control. When set to <b>True</b>, keystrokes entered in the edit box for the
|
|
control are used to locate a value in Items which begins with the entered
|
|
value. The <var>ItemIndex</var> property is updated with the ordinal position
|
|
for the matching item, or -1 if an entry is not found that starts with the
|
|
partial value.
|
|
</p>
|
|
<p>
|
|
Reading the value in AutoComplete causes the <var>AutoCompleteText</var>
|
|
property to be examined, and returns <b>True</b> when the value
|
|
<var>cbactEnabled</var> is included in the auto-complete options. Assigning a
|
|
value to AutoComplete causes the AutoCompleteText property to include or
|
|
exclude the corresponding value as needed.
|
|
</p>
|
|
<p>
|
|
Use AutoCompleteText to enable or disable other auto-complete features and
|
|
behaviors in the control.
|
|
</p>
|
|
<p>
|
|
Auto-completion related tasks are performed when the <var>KeyUp</var> method
|
|
handles valid keystrokes for the control.
|
|
</p>
|
|
<p>
|
|
Use <var>AutoSelect</var> to control whether text is automatically
|
|
highlighted in the edit box when a new list item is selected in the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.AutoCompleteText"/>
|
|
<link id="TCustomComboBox.AutoSelect"/>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.ItemIndex"/>
|
|
<link id="TCustomComboBox.KeyUp"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.AutoCompleteText">
|
|
<short>Options for the behavior of the Auto-Complete feature.</short>
|
|
<descr>
|
|
<dl>
|
|
<dt>Enabled</dt>
|
|
<dd> Enable Auto-Completion features.</dd>
|
|
<dt>EndOfLineComplete</dt>
|
|
<dd>Perform Auto-Complete only when cursor is at the end of the string.</dd>
|
|
<dt>RetainPrefixCase</dt>
|
|
<dd>
|
|
Retains the case of characters user has typed. This option has no effect if
|
|
cbactEndOfLineComplete is <b>False</b>.
|
|
</dd>
|
|
<dt>SearchCaseSensitive</dt>
|
|
<dd>Search completion string with case sensitivity.</dd>
|
|
<dt>SearchAscending</dt>
|
|
<dd>
|
|
Search completion string in ascending order. <b>False</b> will search in
|
|
descending order.
|
|
</dd>
|
|
</dl>
|
|
<p>
|
|
This property exists as a <var>Set</var> of <var>Options</var>, so zero or
|
|
more options may be operational.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TComboBoxAutoCompleteTextOption"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.AutoDropDown">
|
|
<short>
|
|
Makes the drop-down list appear as soon as the user starts entering text.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>AutoDropDown</var> is a <var>Boolean</var> property which indicates if
|
|
the drop-down list for the control is automatically displayed. When set to
|
|
<b>False</b>, the drop-down list appears when the down button is clicked, or
|
|
the Alt+Down key sequence is entered. The value in AutoDropDown is
|
|
maintained, based on the <var>Style</var> for the control, when
|
|
<var>KeyDown</var> is called to handle key events.
|
|
</p>
|
|
<p>
|
|
Use <var>DroppedDown</var> to show or hide the list box for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="TCustomComboBox.KeyDown"/>
|
|
<link id="TCustomComboBox.DroppedDown"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.AutoSelect">
|
|
<short>
|
|
Selects the entire content of the edit box when the control receives the
|
|
focus.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
When <b>True</b>, the edit control will select all its text when:
|
|
</p>
|
|
<ul>
|
|
<li>It receives focus</li>
|
|
<li>The Enter key is pressed.</li>
|
|
<li>A new item is selected.</li>
|
|
</ul>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.AutoSelected"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.AutoSelected">
|
|
<short>
|
|
<b>True</b> indicates that the selection was marked automatically by the
|
|
control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<b>True</b> indicates that the combo-box control has just performed an
|
|
<var>AutoSelect</var> operation so that subsequent mouse-clicks and
|
|
keystrokes proceed normally without selecting the text.
|
|
</p>
|
|
<p>
|
|
<b>False</b> is set when the combo-box control loses focus.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.AutoSelect"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.AutoSize" link="#lcl.controls.TControl.AutoSize"/>
|
|
|
|
<element name="TCustomComboBox.ArrowKeysTraverseList">
|
|
<short>
|
|
Indicates if keyboard Arrow (or cursor) keys can be used to move through the
|
|
list.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>ArrowKeysTraverseList</var> indicates if Arrow (or Cursor) keys on the
|
|
keyboard can be used to navigate the <var>Items</var> displayed in the
|
|
drop-down list box for the control. The default value for the property is
|
|
<b>True</b>.
|
|
</p>
|
|
<p>
|
|
The value in the property is passed to the widgetset class when the LCL
|
|
interface object is created. Changing the value for the property causes the
|
|
widgetset class to be notified using its <var>SetArrowKeysTraverseList</var>
|
|
method.
|
|
</p>
|
|
<p>
|
|
The property value is used in the implementation of the <var>KeyDown</var>
|
|
method, and may be updated as the drop-down list for the control is displayed
|
|
or hidden. For some widgetsets (Darwin), the arrow keys cannot be handled in
|
|
the LCL and the keyboard message(s) are ignored.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.KeyDown"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.Canvas">
|
|
<short>Provides access to the drawing surface for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Canvas</var> is a read-only <var>TCanvas</var> property which provides
|
|
access to the drawing surface used for the control. The class implementation
|
|
actually uses a <var>TControlCanvas</var> instance in the member.
|
|
</p>
|
|
<p>
|
|
Canvas is used in methods like <var>DrawItem</var>, and in private methods
|
|
which handle the <b>LM_DrawListItem</b> message for the control. Canvas is
|
|
also passed as an argument to methods in the ancestor class like
|
|
<var>PaintTo</var>. Canvas can be useful in <var>OnDrawItem</var> event
|
|
handler when used to render list items for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.DrawItem"/>
|
|
<link id="TCustomComboBox.OnDrawItem"/>
|
|
<link id="#lcl.controls.TWinControl.PaintTo">TWinControl.PaintTo</link>
|
|
<link id="#lcl.graphics.TCanvas">TCanvas</link>
|
|
<link id="#lcl.controls.TControlCanvas">TControlCanvas</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.DropDownCount">
|
|
<short>
|
|
The maximum number of Items visible in the drop-down list for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>DropDownCount</var> is an <var>Integer</var> property which specifies
|
|
the maximum number of values from <var>Items</var> that can be displayed in
|
|
the drop-down list for the control. Setting a new value for the property
|
|
causes the widgetset class to be notified using its
|
|
<var>SetDropDownCount</var> method when a handle has been allocated for the
|
|
control.
|
|
</p>
|
|
<p>
|
|
DropDownCount is used (along with the item count and <var>ItemHeight</var>)
|
|
in the <var>AdjustDropDown</var> method to set the minimum dimensions for the
|
|
drop-down list.
|
|
</p>
|
|
<p>
|
|
The default value for the property is <b>8</b>.
|
|
</p>
|
|
<remark>
|
|
For the macOS Carbon and GTK2 widgetsets, changing the value in DropDownCount
|
|
does not affect the control. This attribute is determined by the native
|
|
control.
|
|
</remark>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.ItemHeight"/>
|
|
<link id="TCustomComboBox.GetItemCount"/>
|
|
<link id="TCustomComboBox.AdjustDropDown"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.EmulatedTextHintStatus">
|
|
<short>Status for the emulated TextHint in the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>EmulatedTextHintStatus</var> is a read-only
|
|
<var>TEmulatedTextHintStatus</var> property which contains the status value
|
|
for an emulated TextHint display in the control. EmulatedTextHintStatus is
|
|
used when a value has been assigned to the <var>TextHint</var> property and
|
|
the widgetset does not natively implement the capability. The LCL emulates
|
|
the TextHint display by assigning the value in TextHint to the
|
|
<var>Text</var> for the control.
|
|
</p>
|
|
<p>
|
|
EmulatedTextHintStatus is updated in the private
|
|
<var>ShowEmulatedTextHint</var> and <var>HideEmulatedTextHint</var> methods.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TEmulatedTextHintStatus"/>
|
|
<link id="TCustomComboBox.TextHint"/>
|
|
<link id="TCustomComboBox.Text"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.Items">
|
|
<short>The list of items displayed in the combo-box control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Items</var> is a <var>TStrings</var> property which contains the strings
|
|
displayed in the static or drop-down list for the control. Settings a new
|
|
TStrings value for the property causes the Assign method to be called to load
|
|
the string values into the current class instance.
|
|
</p>
|
|
<p>
|
|
As an alternative, use the <var>OnGetItems</var> event handler to dynamically
|
|
populate the values in Items when the drop-down list for the control is
|
|
displayed (or created).
|
|
</p>
|
|
<p>
|
|
String values in Items can be ordered alphabetically by setting the
|
|
<var>Sorted</var> property to <b>True</b>. This also affects the ordinal
|
|
position for new values added to Items. Its index will be the position in the
|
|
sorted order, and not necessarily at the end of the list.
|
|
</p>
|
|
<p>
|
|
Use ItemIndex to determine the ordinal position in Items with the value
|
|
displayed the edit box for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.ItemIndex"/>
|
|
<link id="TCustomComboBox.Sorted"/>
|
|
<link id="TCustomComboBox.OnGetItems"/>
|
|
<link id="TCustomComboBox.Text"/>
|
|
<link id="#rtl.classes.TStrings">TStrings</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.ItemIndex">
|
|
<short>
|
|
The index of the currently selected item, or -1 if none is selected.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>ItemIndex</var> is an <var>Integer</var> property which contains the
|
|
ordinal position in <var>Items</var> for the current list box selection in
|
|
the control. The first value in Items is at index position <b>0</b>
|
|
(<b>zero</b>). The final value in Items is at the index position
|
|
<var>ItemCount</var><b>-1</b>. When no value is selected in the list box,
|
|
ItemIndex is set to <b>-1</b>. The default value for the property is
|
|
<b>-1</b>.
|
|
</p>
|
|
<p>
|
|
When the value for the property is read, the widgetset class is queried when
|
|
a handle has been assigned for the control.
|
|
</p>
|
|
<p>
|
|
Assigning a new value to the property causes the value in <var>Text</var> to
|
|
be updated to reflect the new selection in the control. When ItemIndex is
|
|
<b>-1</b>, Text is set to an empty string ('').
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.AddItem"/>
|
|
<link id="TCustomComboBox.Text"/>
|
|
<link id="TCustomComboBox.AddHistoryItem"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.ReadOnly">
|
|
<short>
|
|
Disallows free-form entry of Text into the combo-box edit field.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
When <b>True</b>, the text can be changed only by selecting an item from the
|
|
combo-box items list. When <b>False</b>, the text can be changed by free-form
|
|
entry of a value in the edit field.
|
|
</p>
|
|
<p>
|
|
Changing the property value doesn't affect the style for the control in any
|
|
manner. Changing the style doesn't affect the value in the property, as well.
|
|
For some styles (such as csDropDownList) the property might have no effect
|
|
because it is ignored.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Text"/>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="TCustomComboBox.AutoComplete"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SelLength">
|
|
<short>The number of selected UTF-8 characters in the edit box.</short>
|
|
<descr>
|
|
<p>
|
|
<var>SelLength</var> is an <var>Integer</var> property which indicates the
|
|
number of UTF-8-encoded characters selected in the edit box for the control.
|
|
SelLength is used along with <var>SelStart</var> to determine the value in
|
|
<var>SelText</var>.
|
|
</p>
|
|
<p>
|
|
Use SelStart to determine the position in Text for the selected value in the
|
|
edit box for the control.
|
|
</p>
|
|
<p>
|
|
Use SelText to get the content selected in the edit box. Assigning a new
|
|
value to SelText causes the value in SelLength to be updated.
|
|
</p>
|
|
<p>
|
|
SelLength is updated in the <var>SelectAll</var> method after the selection
|
|
text is updated. It is also updated when <var>KeyUp</var> performs
|
|
auto-completion for alphanumeric values entered in the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.SelStart"/>
|
|
<link id="TCustomComboBox.SelText"/>
|
|
<link id="TCustomComboBox.Text"/>
|
|
<link id="TCustomComboBox.SelectAll"/>
|
|
<link id="TCustomComboBox.KeyUp"/>
|
|
<link id="TCustomComboBox.AutoComplete"/>
|
|
<link id="TCustomComboBox.AutoCompleteText"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SelStart">
|
|
<short>
|
|
<b>zero-based</b> index to the UTF-8 character at the beginning of the
|
|
selected text in the edit box.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
If text is selected in the edit box for the control, this is the starting
|
|
position. When no text is selected, SelStart is the cursor position and
|
|
SelLength is 0 (zero).
|
|
</p>
|
|
<p>
|
|
Writing a new value to the property moves the cursor, and removes the current
|
|
text selection. Set SelLength after changing SelStart, to establish a new
|
|
text selection.
|
|
</p>
|
|
<p>
|
|
SelStart is a <b>zero-based</b> index to UTF-8 character in the Text, in
|
|
contrast to the usual <b>1-based</b> string indices. The value 0 means the
|
|
first UTF-8 character, the value 1 means the second UTF-8 character, etc.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.SelLength"/>
|
|
<link id="TCustomComboBox.SelText"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.SelText">
|
|
<short>The selected text in the edit box for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>SelText</var> is a <var>String</var> property which contains the
|
|
selected text in the edit box for the control. The property value is
|
|
determined by the values in <var>SelStart</var> and <var>SelLength</var>.
|
|
Assign a new string value to replace the selected text within the
|
|
<var>Text</var> for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.SelStart"/>
|
|
<link id="TCustomComboBox.SelLength"/>
|
|
<link id="TCustomComboBox.Text"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.Style">
|
|
<short>
|
|
Controls the appearance and behavior for the combo-box.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
Style is quite Windows-centric, reflecting the evolution of combo-box styles.
|
|
The basic styles are:
|
|
</p>
|
|
<dl>
|
|
<dt>csSimple</dt>
|
|
<dd>Displays an edit box with an attached list (not a drop-down list).</dd>
|
|
<dt>csDropDown</dt>
|
|
<dd>Displays an edit box with a drop-down list.</dd>
|
|
<dt>csDropDownList</dt>
|
|
<dd>
|
|
Values cannot be entered by the user in the edit box, only selected from the
|
|
drop-down list.
|
|
</dd>
|
|
</dl>
|
|
<p>
|
|
Owner-drawn drop-down lists have been added, with the values:
|
|
</p>
|
|
<dl>
|
|
<dt>csOwnerDrawFixed</dt>
|
|
<dd>All items in the drop-down list are drawn with the same height.</dd>
|
|
<dt>csOwnerDrawVariable</dt>
|
|
<dd>Each item in the list can have a different height.</dd>
|
|
</dl>
|
|
<remark>
|
|
For the macOS Carbon widgetset, the following style values are not recognized:
|
|
csSimple, csOwnerDrawFixed and csOwnerDrawVariable. They are not supported in
|
|
the native control.
|
|
</remark>
|
|
</descr>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.TabStop">
|
|
<short>
|
|
Enables or disables keyboard navigation using the Tab or Shift+Tab keys.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
Allows the user to navigate to or from this control by pressing the Tab or
|
|
Shift+Tab keys. The default value for the property is <b>True</b> in
|
|
TCustomComboBox.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.TabStop">TWinControl.TabStop</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.Text">
|
|
<short>The value in the edit box for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Text</var> is a public property in <var>TCustomComboBox</var> and
|
|
contains the <var>TCaption</var> value for the control. It is the value
|
|
displayed in the edit box for the control.
|
|
</p>
|
|
<p>
|
|
Setting a new value for Text in program code causes the
|
|
<var>RealSetText</var> method to be called. The new property value is located
|
|
in the <var>Items</var> property, and the value in <var>ItemIndex</var> is
|
|
updated with the ordinal position for the found value. A case-insensitive
|
|
comparison is used to locate the value in Items. The value applied to Text
|
|
retains the original case used in the new property value. ItemIndex is set to
|
|
<b>-1</b> if a value is not located in Items that is a case-insensitive match
|
|
the new property value.
|
|
</p>
|
|
<p>
|
|
At run-time, the value in Text can be updated using the edit box for the
|
|
control when it is enabled for the selected <var>Style</var> (such as
|
|
<var>csDropDown</var> and <var>csSimple</var>). When Style contains
|
|
<var>csDropDownList</var>, the edit box is not displayed. But the button for
|
|
the drop-down list handles the first character key pressed, and locates a
|
|
value in Items when the button has focus.
|
|
</p>
|
|
<p>
|
|
<var>AutoComplete</var> enables or disables auto-completion for the value in
|
|
Text. When set to <b>True</b>, the first item that matches the entered
|
|
character(s) is located in Items and the value is highlighted in the
|
|
drop-down list for the control. By default, a case-insensitive comparison is
|
|
used to find the entered value. Case sensitivity can be enabled using
|
|
<var>cbactSearchCaseSensitive</var> in the <var>AutoCompleteText</var>
|
|
options, and requires the value in Items to be an exact case-sensitive match
|
|
for the character(s) entered in the edit box. Text is updated to contain the
|
|
complete value for the entry in Items. By default, the case for the value in
|
|
Items is retained and applied to Text. Include
|
|
<var>cbactRetainPrefixCase</var> in AutoCompleteText options to use the value
|
|
as entered in the edit box in the Text property.
|
|
</p>
|
|
<p>
|
|
When the edit box loses input focus, ItemIndex is updated with the ordinal
|
|
position in Items where the partial value was found. It is set to <b>-1</b>
|
|
when a matching value could not be located in Items.
|
|
</p>
|
|
<p>
|
|
When AutoComplete is disabled (set to <b>False</b>), the entered value is
|
|
still located located and highlighted in the drop-down list for Items.
|
|
However, the value in Text is not expanded and the the value in ItemIndex is
|
|
not updated. The item must be selected using the drop-down list to apply the
|
|
value to Text and update the value in ItemIndex.
|
|
</p>
|
|
<p>
|
|
Use ItemIndex to select one of the Items by its ordinal position, and apply
|
|
the value to the Text property.
|
|
</p>
|
|
</descr>
|
|
<notes>
|
|
<note>
|
|
A test application was used to verify the described functionality on the
|
|
Windows platform. It has been attached to Issue #39413 to allow testing for
|
|
other platforms / widgetsets.
|
|
</note>
|
|
</notes>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Style"/>
|
|
<link id="TCustomComboBox.AutoComplete"/>
|
|
<link id="TCustomComboBox.AutoCompleteText"/>
|
|
<link id="TCustomComboBox.Items"/>
|
|
<link id="TCustomComboBox.ItemIndex"/>
|
|
<link id="TCustomComboBox.ReadOnly"/>
|
|
<link id="TComboBoxAutoCompleteText"/>
|
|
<link id="TComboBoxAutoCompleteTextOption"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomComboBox.TextHint">
|
|
<short>
|
|
Default hint text shown when the Text property is empty for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TextHint</var> is a <var>TTranslateString</var> property which contains
|
|
the inline hint text displayed for the control. It is displayed in the
|
|
editable area for the <var>TCustomComboBox</var> when the Text property is
|
|
empty. Some platforms may refer to this feature as a "placeholder" or "editing
|
|
hint". As a TTranslateString value, it can be translated using the LCL
|
|
localization mechanism when enabled for the project.
|
|
</p>
|
|
<p>
|
|
The value in TextHint is normally displayed using the color in clGrayText.
|
|
</p>
|
|
<p>
|
|
The display behavior for TextHint is platform-specific. On some platforms, the
|
|
text hint is displayed any time the value in Text is empty. For others, it is
|
|
displayed only when the control does not have focus.
|
|
</p>
|
|
<p>
|
|
Setting a new value in TextHint causes the widgetset class to be notified,
|
|
and the value is displayed in the edit control when allowed. If the new
|
|
property value is an empty string (''), the text hint is removed from the
|
|
control.
|
|
</p>
|
|
<p>
|
|
For platforms that do not provide native support for TextHint, an emulated
|
|
text hint is displayed. This is a TCustomEdit control created to enable the
|
|
feature, and can be displayed only when the original control does not have
|
|
focus.
|
|
</p>
|
|
<p>
|
|
TextHint is different than Hint, which displays a balloon tip when ShowHint is
|
|
set to <b>True</b> and the mouse is over the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomComboBox.Text"/>
|
|
<link id="TCustomComboBox.CanShowEmulatedTextHint"/>
|
|
<link id="#lcl.controls.TControl.Hint">TControl.Hint</link>
|
|
<link id="#lcl.controls.TControl.ShowHint">TControl.ShowHint</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TComboBox">
|
|
<short>
|
|
A combination of an edit box and a (drop-down) list allowing one of several
|
|
options to be chosen.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
The Text property reflects the text entered into the edit box, or selected
|
|
from the list.
|
|
</p>
|
|
<p>
|
|
The selectable values are kept in the <var>Items</var> list. Clicking on the
|
|
ellipsis character (<b>...</b>), next to <var>Items</var> in the Object
|
|
Inspector, opens an editor which allows the designer to populate the Items
|
|
list.
|
|
</p>
|
|
<p>
|
|
At run-time, the entry selected from the list replaces the text in the edit
|
|
box, and <var>ItemIndex</var> holds the (zero-based) index number of the
|
|
selected item.
|
|
</p>
|
|
<p>
|
|
If no value is selected from the drop-down list, the default text (if any)
|
|
remains, or any information typed directly into <var>Text</var> will be
|
|
returned, and <var>ItemIndex</var> takes the value of -1.
|
|
</p>
|
|
<remark>
|
|
The Height property in TComboBox cannot be changed for some platforms, like
|
|
Windows and macOS Carbon. It is best to set AutoSize to <b>True</b> to ensure
|
|
consistent size handling on the supported platforms.
|
|
</remark>
|
|
<remark>
|
|
Changing the value in BorderStyle to bsNone has no effect for the Windows
|
|
widgetset. It is impossible to remove the border under Windows.
|
|
</remark>
|
|
</descr>
|
|
<seealso>
|
|
<link id="HowToUseStdCtrls"/>
|
|
<link id="TComboBox.Items"/>
|
|
<link id="TComboBox.ItemIndex"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TComboBox.Align" link="#lcl.controls.TControl.Align"/>
|
|
<element name="TComboBox.Anchors" link="#lcl.controls.TControl.Anchors"/>
|
|
<element name="TComboBox.ArrowKeysTraverseList" link="#lcl.stdctrls.TCustomComboBox.ArrowKeysTraverseList"/>
|
|
<element name="TComboBox.AutoComplete" link="#lcl.stdctrls.TCustomComboBox.AutoComplete"/>
|
|
<element name="TComboBox.AutoCompleteText" link="#lcl.stdctrls.TCustomComboBox.AutoCompleteText"/>
|
|
<element name="TComboBox.AutoDropDown" link="#lcl.stdctrls.TCustomComboBox.AutoDropDown"/>
|
|
<element name="TComboBox.AutoSelect" link="#lcl.stdctrls.TCustomComboBox.AutoSelect"/>
|
|
<element name="TComboBox.AutoSize" link="#lcl.controls.TControl.AutoSize"/>
|
|
<element name="TComboBox.BidiMode" link="#lcl.controls.TControl.BiDiMode"/>
|
|
<element name="TComboBox.BorderSpacing" link="#lcl.controls.TControl.BorderSpacing"/>
|
|
<element name="TComboBox.BorderStyle" link="#lcl.controls.TWinControl.BorderStyle"/>
|
|
<element name="TComboBox.CharCase" link="#lcl.stdctrls.TCustomComboBox.CharCase"/>
|
|
<element name="TComboBox.Color" link="#lcl.controls.TControl.Color"/>
|
|
<element name="TComboBox.Constraints" link="#lcl.controls.TControl.Constraints"/>
|
|
<element name="TComboBox.DoubleBuffered" link="#lcl.controls.TWinControl.DoubleBuffered"/>
|
|
<element name="TComboBox.DragCursor" link="#lcl.controls.TControl.DragCursor"/>
|
|
<element name="TComboBox.DragKind" link="#lcl.controls.TControl.DragKind"/>
|
|
<element name="TComboBox.DragMode" link="#lcl.controls.TControl.DragMode"/>
|
|
<element name="TComboBox.DropDownCount" link="#lcl.stdctrls.TCustomComboBox.DropDownCount"/>
|
|
<element name="TComboBox.Enabled" link="#lcl.controls.TControl.Enabled"/>
|
|
<element name="TComboBox.Font" link="#lcl.controls.TControl.Font"/>
|
|
<element name="TComboBox.ItemHeight" link="#lcl.stdctrls.TCustomComboBox.ItemHeight"/>
|
|
<element name="TComboBox.ItemIndex" link="#lcl.stdctrls.TCustomComboBox.ItemIndex"/>
|
|
<element name="TComboBox.Items" link="#lcl.stdctrls.TCustomComboBox.Items"/>
|
|
<element name="TComboBox.ItemWidth" link="#lcl.stdctrls.TCustomComboBox.ItemWidth"/>
|
|
<element name="TComboBox.MaxLength" link="#lcl.stdctrls.TCustomComboBox.MaxLength"/>
|
|
<element name="TComboBox.OnChange" link="#lcl.stdctrls.TCustomComboBox.OnChange"/>
|
|
<element name="TComboBox.ParentBidiMode" link="#lcl.controls.TControl.ParentBiDiMode"/>
|
|
<element name="TComboBox.ParentColor" link="#lcl.stdctrls.TCustomComboBox.ParentColor"/>
|
|
<element name="TComboBox.ParentDoubleBuffered" link="#lcl.controls.TWinControl.ParentDoubleBuffered"/>
|
|
<element name="TComboBox.ParentFont" link="#lcl.controls.TControl.ParentFont"/>
|
|
<element name="TComboBox.ParentShowHint" link="#lcl.controls.TControl.ParentShowHint"/>
|
|
<element name="TComboBox.PopupMenu" link="#lcl.controls.TControl.PopupMenu"/>
|
|
<element name="TComboBox.ReadOnly" link="#lcl.stdctrls.TCustomComboBox.ReadOnly"/>
|
|
<element name="TComboBox.ShowHint" link="#lcl.controls.TControl.ShowHint"/>
|
|
<element name="TComboBox.Sorted" link="#lcl.stdctrls.TCustomComboBox.Sorted"/>
|
|
<element name="TComboBox.Style" link="#lcl.stdctrls.TCustomComboBox.Style"/>
|
|
<element name="TComboBox.TabOrder" link="#lcl.controls.TWinControl.TabOrder"/>
|
|
<element name="TComboBox.TabStop" link="#lcl.stdctrls.TCustomComboBox.TabStop"/>
|
|
<element name="TComboBox.Text" link="#lcl.stdctrls.TCustomComboBox.Text"/>
|
|
<element name="TComboBox.TextHint" link="#lcl.stdctrls.TCustomComboBox.TextHint"/>
|
|
<element name="TComboBox.Visible" link="#lcl.controls.TControl.Visible"/>
|
|
<element name="TComboBox.OnChangeBounds" link="#lcl.controls.TControl.OnChangeBounds"/>
|
|
<element name="TComboBox.OnClick" link="#lcl.controls.TControl.OnClick"/>
|
|
<element name="TComboBox.OnCloseUp" link="#lcl.stdctrls.TCustomComboBox.OnCloseUp"/>
|
|
<element name="TComboBox.OnContextPopup" link="#lcl.controls.TControl.OnContextPopup"/>
|
|
<element name="TComboBox.OnDblClick" link="#lcl.controls.TControl.OnDblClick"/>
|
|
<element name="TComboBox.OnDragDrop" link="#lcl.controls.TControl.OnDragDrop"/>
|
|
<element name="TComboBox.OnDragOver" link="#lcl.controls.TControl.OnDragOver"/>
|
|
<element name="TComboBox.OnDrawItem" link="#lcl.stdctrls.TCustomComboBox.OnDrawItem"/>
|
|
<element name="TComboBox.OnDropDown" link="#lcl.stdctrls.TCustomComboBox.OnDropDown"/>
|
|
<element name="TComboBox.OnEndDrag" link="#lcl.controls.TControl.OnEndDrag"/>
|
|
<element name="TComboBox.OnEditingDone" link="#lcl.controls.TControl.OnEditingDone"/>
|
|
<element name="TComboBox.OnEnter" link="#lcl.controls.TWinControl.OnEnter"/>
|
|
<element name="TComboBox.OnExit" link="#lcl.controls.TWinControl.OnExit"/>
|
|
<element name="TComboBox.OnGetItems" link="#lcl.stdctrls.TCustomComboBox.OnGetItems"/>
|
|
<element name="TComboBox.OnKeyDown" link="#lcl.controls.TWinControl.OnKeyDown"/>
|
|
<element name="TComboBox.OnKeyPress" link="#lcl.controls.TWinControl.OnKeyPress"/>
|
|
<element name="TComboBox.OnKeyUp" link="#lcl.controls.TWinControl.OnKeyUp"/>
|
|
<element name="TComboBox.OnMeasureItem" link="#lcl.stdctrls.TCustomComboBox.OnMeasureItem"/>
|
|
<element name="TComboBox.OnMouseDown" link="#lcl.controls.TControl.OnMouseDown"/>
|
|
<element name="TComboBox.OnMouseEnter" link="#lcl.controls.TControl.OnMouseEnter"/>
|
|
<element name="TComboBox.OnMouseLeave" link="#lcl.controls.TControl.OnMouseLeave"/>
|
|
<element name="TComboBox.OnMouseMove" link="#lcl.controls.TControl.OnMouseMove"/>
|
|
<element name="TComboBox.OnMouseUp" link="#lcl.controls.TControl.OnMouseUp"/>
|
|
<element name="TComboBox.OnMouseWheel" link="#lcl.controls.TControl.OnMouseWheel"/>
|
|
<element name="TComboBox.OnMouseWheelDown" link="#lcl.controls.TControl.OnMouseWheelDown"/>
|
|
<element name="TComboBox.OnMouseWheelUp" link="#lcl.controls.TControl.OnMouseWheelUp"/>
|
|
<element name="TComboBox.OnSelect" link="#lcl.stdctrls.TCustomComboBox.OnSelect"/>
|
|
<element name="TComboBox.OnStartDrag" link="#lcl.controls.TControl.OnStartDrag"/>
|
|
<element name="TComboBox.OnUTF8KeyPress" link="#lcl.controls.TWinControl.OnUTF8KeyPress"/>
|
|
|
|
<element name="TListBoxStyle">
|
|
<short>Determines how items are drawn in a list box control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TListBoxStyle</var> is an enumerated type with values that determine how
|
|
items in the list box control are populated and drawn. TListBoxStyle is the
|
|
type used to implement the <var>Style</var> property in
|
|
<var>TCustomListBox</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.Style"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TListBoxStyle.lbStandard">
|
|
<short>Items drawn by the widgetset class.</short>
|
|
</element>
|
|
<element name="TListBoxStyle.lbOwnerDrawFixed">
|
|
<short>Items drawn by user code, and all items have the same height.</short>
|
|
</element>
|
|
<element name="TListBoxStyle.lbOwnerDrawVariable">
|
|
<short>
|
|
Items drawn by user code, and each item can have a different height.
|
|
</short>
|
|
</element>
|
|
<element name="TListBoxStyle.lbVirtual">
|
|
<short>Not used in the current LCL version.</short>
|
|
</element>
|
|
|
|
<element name="TSelectionChangeEvent">
|
|
<short>
|
|
Specifies an event handler for change notifications from a list box control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TSelectionChangeEvent</var> is an object procedure type which specifies
|
|
an event handler signalled when the select is changed in a list box control.
|
|
Arguments passed to the handler identify the list box control, and the origin
|
|
of the change notification.
|
|
</p>
|
|
<p>
|
|
TSelectionChangeEvent is the type used to implement the
|
|
<var>OnSelectionChange</var> property in <var>TCustomListBox</var>. The
|
|
application must implement and assign an object procedure using the signature
|
|
for the handler to respond to the event notification.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TSelectionChangeEvent.Sender">
|
|
<short>The list box control for the notification.</short>
|
|
</element>
|
|
<element name="TSelectionChangeEvent.User">
|
|
<short>
|
|
<b>True</b> if the user changed the selection, <b>False</b> if changed by
|
|
code.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TListBoxOption">
|
|
<short>Represents options available in a list box control.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TListBoxOptions"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TListBoxOption.lboDrawFocusRect">
|
|
<short>Draws a focus rectangle when owner draw is enabled.</short>
|
|
</element>
|
|
|
|
<element name="TListBoxOptions">
|
|
<short>
|
|
Set type used to store values from the TListBoxOption enumeration.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
Set type used to store zero or more values for the <var>TListBoxOption</var>
|
|
enumeration. <var>TListBoxOptions</var> is the type used for the
|
|
<var>Options</var> property in <var>TCustomListBox</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TListBoxOption"/>
|
|
<link id="TCustomListBox.Options"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox">
|
|
<short>The base class for <var>TListBox</var>.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TCustomListBox</var> is a <var>TWinControl</var> descendant which
|
|
specifies the base class used for a list box control. A list box displays a
|
|
scrollable list which allows selection of one or more of the item values.
|
|
</p>
|
|
<p>
|
|
TCustomListBox provides methods, properties, and events used to display,
|
|
order, and select item values. The Items for the control can be assigned at
|
|
design-time in the Lazarus IDE, or stored at run-time. Owner-drawn styles are
|
|
available to render icons or bitmaps along with the text for the items, or
|
|
using a variable height for list items. A Canvas property is provided for
|
|
owner-drawn usage. Items in the list box can be display in one or more
|
|
columns.
|
|
</p>
|
|
<p>
|
|
Do not create instances of TCustomListBox; use the <var>TListBox</var>
|
|
descendant.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TListBox"/>
|
|
<link id="#lcl.controls.TWinControl">TWinControl</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.FCacheValid"/>
|
|
<element name="TCustomListBox.FCanvas"/>
|
|
|
|
<element name="TCustomListBox.FClickOnSelChange" link="#lcl.stdctrls.TCustomListBox.ClickOnSelChange"/>
|
|
<element name="TCustomListBox.FClickTriggeredBySelectionChange"/>
|
|
<element name="TCustomListBox.FColumns" link="#lcl.stdctrls.TCustomListBox.Columns"/>
|
|
<element name="TCustomListBox.FExtendedSelect" link="#lcl.stdctrls.TCustomListBox.ExtendedSelect"/>
|
|
<element name="TCustomListBox.FIntegralHeight" link="#lcl.stdctrls.TCustomListBox.IntegralHeight"/>
|
|
<element name="TCustomListBox.FItemHeight" link="#lcl.stdctrls.TCustomListBox.ItemHeight"/>
|
|
<element name="TCustomListBox.FItemIndex" link="#lcl.stdctrls.TCustomListBox.ItemIndex"/>
|
|
<element name="TCustomListBox.FItems" link="#lcl.stdctrls.TCustomListBox.Items"/>
|
|
<element name="TCustomListBox.FLockSelectionChange"/>
|
|
<element name="TCustomListBox.FMultiSelect" link="#lcl.stdctrls.TCustomListBox.MultiSelect"/>
|
|
<element name="TCustomListBox.FOnDrawItem" link="#lcl.stdctrls.TCustomListBox.OnDrawItem"/>
|
|
<element name="TCustomListBox.FOnMeasureItem" link="#lcl.stdctrls.TCustomListBox.OnMeasureItem"/>
|
|
<element name="TCustomListBox.FOnSelectionChange" link="#lcl.stdctrls.TCustomListBox.OnSelectionChange"/>
|
|
<element name="TCustomListBox.FScrollWidth" link="#lcl.stdctrls.TCustomListBox.ScrollWidth"/>
|
|
<element name="TCustomListBox.FSorted" link="#lcl.stdctrls.TCustomListBox.Sorted"/>
|
|
<element name="TCustomListBox.FStyle" link="#lcl.stdctrls.TCustomListBox.Style"/>
|
|
<element name="TCustomListBox.FTopIndex" link="#lcl.stdctrls.TCustomListBox.TopIndex"/>
|
|
|
|
<element name="TCustomListBox.GetCount" link="#lcl.stdctrls.TCustomListBox.Count"/>
|
|
<element name="TCustomListBox.GetCount.Result">
|
|
<short>Value for the Count property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.GetScrollWidth" link="#lcl.stdctrls.TCustomListBox.ScrollWidth"/>
|
|
<element name="TCustomListBox.GetScrollWidth.Result">
|
|
<short>Value for the ScrollWidth property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.GetTopIndex" link="#lcl.stdctrls.TCustomListBox.TopIndex"/>
|
|
<element name="TCustomListBox.GetTopIndex.Result">
|
|
<short>Value for the TopIndex property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.RaiseIndexOutOfBounds">
|
|
<short>
|
|
Raises an exception if an invalid index position is used to access Items in
|
|
the list box control.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomListBox.RaiseIndexOutOfBounds.AIndex">
|
|
<short>Index position generating the exception.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SetColumns" link="#lcl.stdctrls.TCustomListBox.Columns"/>
|
|
<element name="TCustomListBox.SetColumns.AValue">
|
|
<short>New value for the Columns property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SetScrollWidth" link="#lcl.stdctrls.TCustomListBox.ScrollWidth"/>
|
|
<element name="TCustomListBox.SetScrollWidth.AValue">
|
|
<short>New value for the ScrollWidth property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SetTopIndex" link="#lcl.stdctrls.TCustomListBox.TopIndex"/>
|
|
<element name="TCustomListBox.SetTopIndex.AValue">
|
|
<short>New value for the TopIndex property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.UpdateSelectionMode">
|
|
<short>
|
|
Sends values for ExtendedSelect and MultiSelect to the widgetset class.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.UpdateSorted">
|
|
<short>Sends values in Items and Sorted to the widgetset class.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.LMDrawListItem">
|
|
<short>Handles the LM_DrawListItem message for the control.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomListBox.LMDrawListItem.TheMessage">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.LMMeasureItem">
|
|
<short>Handles the LM_MeasureItem message for the control.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomListBox.LMMeasureItem.TheMessage">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.LMSelChange">
|
|
<short>Handles the LM_SelChange message for the control.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomListBox.LMSelChange.TheMessage">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.WMLButtonUp">
|
|
<short>
|
|
Handles Left mouse button Up events for the control.
|
|
</short>
|
|
<descr>
|
|
Prevents Click from being called twice when using ClickOnSelChange to trigger
|
|
a click event.
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.WMLButtonUp">TControl.WMLButtonUp</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.WMLButtonUp.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SendItemSelected">
|
|
<short>
|
|
Notifies the widgetset class when the selected item in the control is changed.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomListBox.SendItemSelected.Index">
|
|
<short>Ordinal position for the item.</short>
|
|
</element>
|
|
<element name="TCustomListBox.SendItemSelected.IsSelected">
|
|
<short>
|
|
<b>True</b> when the item is selected; <b>False</b> when it is not selected.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.ClearSelectedCache">
|
|
<short>Resets cached item selections for the control.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SetSelectedCache">
|
|
<short>Sets the cached selection state for the specified item.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomListBox.SetSelectedCache.Index">
|
|
<short>Ordinal position in Items to update in the cache.</short>
|
|
</element>
|
|
<element name="TCustomListBox.SetSelectedCache.IsSelected">
|
|
<short>Selection state for the cached item.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.GetSelectedCache">
|
|
<short>Gets the selection state for the specified item from the cache.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomListBox.GetSelectedCache.Result">
|
|
<short><b>True</b> when the item is selected in the cache.</short>
|
|
</element>
|
|
<element name="TCustomListBox.GetSelectedCache.Index">
|
|
<short>Ordinal position in Items for the cached item.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
|
|
|
|
<element name="TCustomListBox.AssignItemDataToCache">
|
|
<short>Copies selected state for an item to the cache.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomListBox.AssignItemDataToCache.AIndex">
|
|
<short>Ordinal position in Items for the entry updated in the cache.</short>
|
|
</element>
|
|
<element name="TCustomListBox.AssignItemDataToCache.AData">
|
|
<short>Pointer to the data stored in the cache for the specified item.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.AssignCacheToItemData">
|
|
<short>Sends the cached selection state to the widget.</short>
|
|
<descr>Called to restore the ItemData after a handle is created.</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomListBox.AssignCacheToItemData.AIndex">
|
|
<short>Ordinal position for the item data read from the cache.</short>
|
|
</element>
|
|
<element name="TCustomListBox.AssignCacheToItemData.AData">
|
|
<short>Pointer to the data read from the cache for the specified item.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.BeforeDragStart">
|
|
<short>
|
|
Notifies the widgetset class that a Drag operation is starting.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>BeforeDragStart</var> is an overridden method in
|
|
<var>TCustomListBox</var> used to perform actions needed to start a drag
|
|
operation for the control. In TCustomListBox, this means that the DragStart
|
|
method in the widgetset class is called. No actions are performed in the
|
|
method if the Handle has not been allocated for the control.
|
|
</p>
|
|
<p>
|
|
BeforeDragStart is called when mouse up, down, and move messages are handled
|
|
by the DragManager for an application.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TControl.BeforeDragStart"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.BeginAutoDrag">
|
|
<short>
|
|
Starts a non-immediate drag / dock operation for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
Calls the inherited <var>BeginDrag</var> method with the <var>Immediate</var>
|
|
argument set to <b>False</b>. The drag operation is detected and handled by
|
|
the DragManager for the application.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.BeginAutoDrag">TControl.BeginAutoDrag</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.CalculateStandardItemHeight">
|
|
<short>
|
|
Determines the standard Height of the items, when the widget has yet been
|
|
created.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>CalculateStandardItemHeight</var> is an <var>Integer</var> function used
|
|
to get the standard height for items in the control.
|
|
CalculateStandardItemHeight is used in descendent classes, like
|
|
<var>TCustomCheckListBox</var>, when its Style property is set to
|
|
<var>lbStandard</var> and the Handle for the control (and its Canvas) has not
|
|
been allocated.
|
|
</p>
|
|
<p>
|
|
CalculateStandardItemHeight gets the height for items using a temporary
|
|
TBitmap instance. The Font for the control is assigned to the Canvas in the
|
|
the bitmap instance, and its TextHeight method is called to get the return
|
|
value.
|
|
</p>
|
|
<p>
|
|
CalculateStandardItemHeight is called from the FontChanged method in the
|
|
TCustomCheckListBox descendent.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.checklst.TCustomCheckListBox.FontChanged">TCustomCheckListBox.FontChanged</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.CalculateStandardItemHeight.Result">
|
|
<short>Height for the items in the control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.CreateParams">
|
|
<short>
|
|
Initializes the creation parameters for the class instance.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>CreateParams</var> is an overridden method used initialize the creation
|
|
parameters for the class instance.
|
|
</p>
|
|
<p>
|
|
CreateParams calls the inherited method, and ensures that the
|
|
<var>Params</var> argument is updated to include style constants needed for
|
|
properties in the list box control. These include the constants needed for
|
|
the <var>Sorted</var>, <var>MultiSelect</var>, and <var>Columns</var>
|
|
properties. Owner-drawn constants are also included based on the value in
|
|
<var>Style</var>. Style constants are always included for scrollbars
|
|
(horizontal and vertical), non-integral item height, string content, and
|
|
notify events.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Sorted"/>
|
|
<link id="TCustomListBox.MultiSelect"/>
|
|
<link id="TCustomListBox.Columns"/>
|
|
<link id="TCustomListBox.Style"/>
|
|
<link id="#lcl.controls.TWinControl.CreateParams">TWinControl.CreateParams</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.CreateParams.Params">
|
|
<short>The creation parameters and flags for the instance.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.InitializeWnd">
|
|
<short>
|
|
Updates Items from the widgetset class and invalidates the item cache.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>InitializeWnd</var> is an overridden method used to synchronize the
|
|
control and the widgetset class. InitializeWnd copies values for the
|
|
<var>Items</var> property from the ones allocated in the widgetset class. The
|
|
value in <var>ItemIndex</var> is passed to the widgetset class when needed.
|
|
An internal flag is reset to invalidate the item cache for the control, and
|
|
the item data from the widgetset class is applied. Finally, the value in
|
|
<var>ScrollWidth</var> is passed to the widgetset class.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.Sorted"/>
|
|
<link id="TCustomListBox.ItemIndex"/>
|
|
<link id="TCustomListBox.ScrollWidth"/>
|
|
<link id="#lcl.controls.TWinControl.InitializeWnd">TWinControl.InitializeWnd</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.DestroyWnd">
|
|
<short>Frees the handle for the window and its canvas.</short>
|
|
<descr>
|
|
<p>
|
|
Calls the inherited method to free the window handle and update flags for the
|
|
control. Frees the handle for the <var>Canvas</var> when assigned.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Canvas"/>
|
|
<link id="#lcl.controls.TWinControl.DestroyWnd">TWinControl.DestroyWnd</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.FinalizeWnd">
|
|
<short>Caches the Items stored in the widgetset class.</short>
|
|
<descr>
|
|
<p>
|
|
<var>FinalizeWnd</var> is an overridden method used to capture values from
|
|
the widgetset class when the handle is destroyed or re-created. FinalizeWnd
|
|
gets the value for <var>ItemIndex</var> when the handle is being re-created.
|
|
Values in <var>Items</var> (and its cached item data) are copied before they
|
|
are freed in the widgetset class. The value in <var>Sorted</var> is
|
|
re-applied to the new values in Items.
|
|
</p>
|
|
<p>
|
|
FinalizeWnd calls the inherited method prior to exit.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.Sorted"/>
|
|
<link id="#lcl.controls.TWinControl.FinalizeWnd">TWinControl.FinalizeWnd</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.GetControlClassDefaultSize" link="#lcl.controls.TControl.GetControlClassDefaultSize"/>
|
|
<element name="TCustomListBox.GetControlClassDefaultSize.Result">
|
|
<short>Default dimensions for a new instance of the class.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.CheckIndex">
|
|
<short>
|
|
Ensures that the Item index is within the bounds for the Items in the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>CheckIndex</var> is a procedure used to ensure that the specified index
|
|
value is within the range of values allowed for the Items in the control.
|
|
CheckIndex examines the value in <var>AIndex</var>, and raises an
|
|
<var>IndexOutOfBounds</var> exception if it is not in the range 0 (zero) to
|
|
Items.Count-1.
|
|
</p>
|
|
<p>
|
|
CheckIndex is used in the access specifiers for the <var>Selected</var>
|
|
property (GetSelected, SetSelected).
|
|
</p>
|
|
</descr>
|
|
<errors>
|
|
Raises an <var>IndexOutOfBounds</var> exception when the index is out of
|
|
bounds.
|
|
</errors>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.Selected"/>
|
|
<link id="TCustomListBox.GetSelected"/>
|
|
<link id="TCustomListBox.SetSelected"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.CheckIndex.AIndex">
|
|
<short>Index position examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.GetItemHeight">
|
|
<short>Gets the value for the ItemHeight property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomListBox.ItemHeight"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.GetItemHeight.Result">
|
|
<short>Value for the ItemHeight property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.GetItemIndex">
|
|
<short>Gets the value for the ItemIndex property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomListBox.ItemIndex"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.GetItemIndex.Result">
|
|
<short>Value for the ItemIndex property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.GetSelCount">
|
|
<short>Gets the value for the SelCount property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomListBox.SelCount"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.GetSelCount.Result">
|
|
<short>Value for the SelCount property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.GetSelected">
|
|
<short>Gets the value for the Selected property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomListBox.Selected"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.GetSelected.Result">
|
|
<short>Value for the Selected property.</short>
|
|
</element>
|
|
<element name="TCustomListBox.GetSelected.Index">
|
|
<short>
|
|
Ordinal position for the item returned as the property value.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.GetCachedDataSize">
|
|
<short>Returns the size for cached item data in the control.</short>
|
|
<descr>
|
|
<p>
|
|
Passed as an argument when creating the <var>TExtendedStringList</var>
|
|
instance used in the Items property.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lazutils.extendedstrings.TExtendedStringList">TExtendedStringList</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.GetCachedDataSize.Result">
|
|
<short>Number f bytes required for the item data in the cache.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.GetCachedData">
|
|
<short>Returns a pointer to the cached item data.</short>
|
|
<descr>
|
|
<p>
|
|
Gets a pointer to the item data for the specified list box item. The return
|
|
value contains the attributes stored in Items at the position in AIndex.
|
|
Items is cast to a TExtendedStringList instance to access its indexed Records
|
|
property.
|
|
</p>
|
|
</descr>
|
|
<errors>
|
|
Raises an InvalidOperation exception when the cache is marked as invalid, i.
|
|
e. when the widgetset class has already been created.
|
|
</errors>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="#lazutils.extendedstrings.TExtendedStringList.Records">TExtendedStringList.Records</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.GetCachedData.Result">
|
|
<short>Pointer to the item data in the cache.</short>
|
|
</element>
|
|
<element name="TCustomListBox.GetCachedData.AIndex">
|
|
<short>
|
|
Ordinal position in Items for the values retrieved in the method.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SetExtendedSelect">
|
|
<short>Sets the value for the ExtendedSelect property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomListBox.ExtendedSelect"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.SetExtendedSelect.Val">
|
|
<short>New value for the ExtendedSelect property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SetItemIndex">
|
|
<short>Sets the value for the ItemIndex property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomListBox.ItemIndex"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.SetItemIndex.AIndex">
|
|
<short>New value for the ItemIndex property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SetItems">
|
|
<short>Sets the value for the Items property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.SetItems.Value">
|
|
<short>New value for the Items property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SetItemHeight">
|
|
<short>Sets the value for the ItemHeight property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomListBox.ItemHeight"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.SetItemHeight.Value">
|
|
<short>New value for the ItemHeight property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SetMultiSelect">
|
|
<short>Sets the value for the MultiSelect property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomListBox.MultiSelect"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.SetMultiSelect.Val">
|
|
<short>New value for the MultiSelect property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SetSelected">
|
|
<short>Sets the value for the Selected property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomListBox.Selected"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.SetSelected.Index">
|
|
<short>Ordinal position for the item updated in the method.</short>
|
|
</element>
|
|
<element name="TCustomListBox.SetSelected.Val">
|
|
<short>New value for the Selected property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SetSorted">
|
|
<short>Sets the value for the Sorted property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomListBox.Sorted"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.SetSorted.Val">
|
|
<short>New value for the Sorted property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SetStyle">
|
|
<short>Sets the value for the Style property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomListBox.Style"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.SetStyle.Val">
|
|
<short>New value for the Style property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.DrawItem">
|
|
<short>Paints an item in owner-draw mode.</short>
|
|
<descr>
|
|
<p>
|
|
<var>DrawItem</var> is a procedure used to render an item in the list box
|
|
control using the owner-draw mode.
|
|
</p>
|
|
<p>
|
|
<var>Item</var> contains the ordinal position in Items for the item drawn in
|
|
the method.
|
|
</p>
|
|
<p>
|
|
<var>ARect</var> is a <var>TRect</var> instance with the canvas coordinates
|
|
where the drawing operation is performed.
|
|
</p>
|
|
<p>
|
|
<var>State</var> contains the drawing state for the owner-drawn item.
|
|
</p>
|
|
<p>
|
|
DrawItem signals the <var>OnDrawItem</var> event handler (when assigned). An
|
|
internal default drawing method is used when the event handler has not been
|
|
implemented.
|
|
</p>
|
|
<p>
|
|
DrawItem is called when the <b>LM_DrawListItem</b> message is handled for the
|
|
control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.OnDrawItem"/>
|
|
<link id="TCustomListBox.Canvas"/>
|
|
<link id="TDrawItemEvent"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.DrawItem.Index">
|
|
<short>Ordinal position for the item drawn in the method.</short>
|
|
</element>
|
|
<element name="TCustomListBox.DrawItem.ARect">
|
|
<short>Canvas rectangle with the coordinate for the drawing operation.</short>
|
|
</element>
|
|
<element name="TCustomListBox.DrawItem.State">
|
|
<short>Drawing state for the item.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.DoAutoAdjustLayout">
|
|
<short>
|
|
Performs actions needed to auto-adjust the control using the specified layout
|
|
policy.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>DoAutoAdjustLayout</var> is an overridden method used to apply an
|
|
auto-adjust layout policy to the control. DoAutoAdjustLayout calls the
|
|
inherited method on entry.
|
|
</p>
|
|
<p>
|
|
DoAutoAdjustLayout ensures that the item height for the control is scaled
|
|
using the factor in <var>AYProportion</var> when <var>AMode</var> contains
|
|
the <var>lapAutoAdjustWithoutHorizontalScrolling</var> or
|
|
<var>lapAutoAdjustForDPI</var> layout adjustment policy values.
|
|
</p>
|
|
<p>
|
|
DoAutoAdjustLayout is called from the <var>AutoAdjustLayout</var> method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.DoAutoAdjustLayout">TControl.DoAutoAdjustLayout</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.DoAutoAdjustLayout.AMode">
|
|
<short>Layout adjustment policy applied in the method.</short>
|
|
</element>
|
|
<element name="TCustomListBox.DoAutoAdjustLayout.AXProportion">
|
|
<short>Factor used to scale horizontal dimensions.</short>
|
|
</element>
|
|
<element name="TCustomListBox.DoAutoAdjustLayout.AYProportion">
|
|
<short>Factor used to scale vertical dimensions.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.DoSelectionChange">
|
|
<short>Signals the OnSelectionChange handler.</short>
|
|
<descr>
|
|
<p>
|
|
<var>DoSelectionChange</var> performs actions needed when the selected item
|
|
in the list box control has been changed. DoSelectionChange signals the
|
|
<var>OnSelectionChange</var> event handler (when assigned).
|
|
</p>
|
|
<p>
|
|
<var>User</var> indicates if the selection was changed as a result of user
|
|
interaction with the control, as opposed to a change performed in code at
|
|
run-time. When User is set to <b>True</b>, and <var>ClickOnSelChange</var> is
|
|
enabled, an internal flag is set to prevent execution of the method by a
|
|
subsequent mouse click.
|
|
</p>
|
|
<p>
|
|
DoSelectionChange is called when the <b>LM_SelChange</b> message is handled
|
|
for the control, and when a new value is assigned to the <var>ItemIndex</var>
|
|
property. User is set to <b>False</b> when the selection change is caused by
|
|
setting a new value in ItemIndex.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.OnSelectionChange"/>
|
|
<link id="TCustomListBox.ItemIndex"/>
|
|
<link id="TCustomListBox.ClickOnSelChange"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.DoSelectionChange.User">
|
|
<short>
|
|
<b>True</b> when the selection change results from user interaction with the
|
|
control.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SendItemIndex">
|
|
<short>Sends the value in ItemIndex to the widgetset class instance.</short>
|
|
<descr>
|
|
<p>
|
|
Called at run-time when a new value is assigned to the <var>ItemIndex</var>
|
|
property and the <var>Handle</var> is valid for the widgetset class instance.
|
|
It is called before the <var>OnSelectionChange</var> event handler is
|
|
signalled.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.ItemIndex"/>
|
|
<link id="TCustomListBox.OnSelectionChange"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.WMGetDlgCode">
|
|
<short>
|
|
Handles Tab, Return, Cursor keys, and Escape characters in control messages.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomListBox.WMGetDlgCode.Message">
|
|
<short>Message examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.Create">
|
|
<short>Constructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Create</var> is the overridden constructor for the class instance, and
|
|
calls the inherited constructor on entry. Create sets the component style to
|
|
<b>csListBox</b>, and allocates resources needed for the <var>Items</var> and
|
|
<var>Canvas</var> properties. Create sets the default values for properties,
|
|
including:
|
|
</p>
|
|
<dl>
|
|
<dt>BorderStyle</dt>
|
|
<dd>Set to bsSingle.</dd>
|
|
<dt>ClickOnSelChange</dt>
|
|
<dd>Set to <b>True</b>.</dd>
|
|
<dt>ItemIndex</dt>
|
|
<dd>Set to -1 to indicate no item is selected.</dd>
|
|
<dt>ExtendedSelect</dt>
|
|
<dd>Set to <b>True</b>.</dd>
|
|
<dt>Options</dt>
|
|
<dd>Set to DefOptions.</dd>
|
|
<dt>Canvas</dt>
|
|
<dd>Cast to a TControlCanvas instance for the current class instance.</dd>
|
|
<dt>ParentColor</dt>
|
|
<dd>Set to <b>False</b>.</dd>
|
|
<dt>TabStop</dt>
|
|
<dd>Set to <b>True</b>.</dd>
|
|
</dl>
|
|
<p>
|
|
Create calls <var>SetInitialBounds</var> to assign the dimensions from the
|
|
<var>GetControlClassDefaultSize</var> method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.Canvas"/>
|
|
<link id="#lcl.controls.TWinControl.Create">TWinControl.Create</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.Create.TheOwner">
|
|
<short>Owner of the class instance.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.Destroy">
|
|
<short>Destructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Destroy</var> is the overridden destructor for the class instance.
|
|
Destroy frees resources allocated for the <var>Items</var> and
|
|
<var>Canvas</var> properties. Destroy calls the inherited destructor prior to
|
|
exiting from the method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Create"/>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.Canvas"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.AddItem">
|
|
<short>Adds an item to the list.</short>
|
|
<descr>
|
|
<p>
|
|
<var>AddItem</var> is a method used to add a string (and an optional
|
|
associated object) to the <var>Items</var> for the control. AddItem calls the
|
|
<var>AddObject</var> method in Items using <var>Item</var> and
|
|
<var>AnObject</var> as arguments.
|
|
</p>
|
|
<p>
|
|
<var>Item</var> contains the string value added to the Items in the control.
|
|
</p>
|
|
<p>
|
|
<var>AnObject</var> is an optional object instance associated with the item,
|
|
and contains <b>Nil</b> when an object instance has not been assigned. The
|
|
object can be retrieved using the <var>Items.Objects</var> property for the
|
|
<var>ItemIndex</var>, and must be cast to the required class type to access
|
|
values in the object instance.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.AddItem.Item">
|
|
<short>The item text.</short>
|
|
</element>
|
|
<element name="TCustomListBox.AddItem.AnObject">
|
|
<short>The associated object, or <b>Nil</b> when not used.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.Click">
|
|
<short>Performs the Changed method when the control is clicked.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Click</var> is an overridden method in <var>TCustomListBox</var>, and
|
|
calls the inherited method on entry. Click calls the <var>Changed</var>
|
|
method (inherited from <var>TControl</var>) to perform the <b>CM_CHANGED</b>
|
|
control message. Click is used in the implementation of the
|
|
<var>DoSelectionChange</var> method when the control is changed by a user
|
|
interaction.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.DoSelectionChange"/>
|
|
<link id="#lcl.controls.TControl.Changed">TControl.Changed</link>
|
|
<link id="#lcl.controls.TControl.Click">TControl.Click</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.Clear">
|
|
<short>Removes all items from the list box control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Clear</var> is a procedure used to remove all values stored in the
|
|
<var>Items</var> property. Clear calls the Clear method in Items, and sets
|
|
the value in <var>ItemIndex</var> to <b>-1</b> to indicate that no item is
|
|
selected in the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.ItemIndex"/>
|
|
<link id="#lazutils.extendedstrings.TExtendedStringList.Clear">TExtendedStringList.Clear</link>
|
|
<link id="#rtl.classes.TStrings.Clear">TStrings.Clear</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.ClearSelection">
|
|
<short>Unselects all items in the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ClearSelection</var> is a procedure used to clear one or more selected
|
|
items in the control. When <var>MultiSelect</var> is enabled, values in the
|
|
<var>Selected</var> property are reset to <b>False</b>. Otherwise, the
|
|
<var>ItemIndex</var> property is set to <b>-1</b> to indicate that no item is
|
|
selected in the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.ItemIndex"/>
|
|
<link id="TCustomListBox.Selected"/>
|
|
<link id="TCustomListBox.SelectRange"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.GetIndexAtXY">
|
|
<short>Gets the index for the item at the given client coordinates.</short>
|
|
<descr>
|
|
<p>
|
|
<var>GetIndexAtXY</var> is an <var>Integer</var> function used to get the
|
|
ordinal position in <var>Items</var> for the list item at the specified
|
|
coordinates. No actions are performed in the method if a handle has not been
|
|
allocated for the control (the widgetset class instance). GetIndexAtXY calls
|
|
the <var>GetIndexAtXY</var> method in the widgetset class to get the return
|
|
value.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.GetIndexAtXY.Result">
|
|
<short>The item index, -1 if an item could not be found.</short>
|
|
</element>
|
|
<element name="TCustomListBox.GetIndexAtXY.X">
|
|
<short>The X client coordinate.</short>
|
|
</element>
|
|
<element name="TCustomListBox.GetIndexAtXY.Y">
|
|
<short>The Y client coordinate.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.GetIndexAtY">
|
|
<short>
|
|
Gets the index position for the item at the specified vertical coordinate.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
Calls GetIndextAtXY to get the return value using the vertical coordinate in
|
|
Y. The value 1 is used as the horizontal coordinate.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.GetIndexAtXY"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.GetIndexAtY.Result">
|
|
<short>The item index, -1 if no item could be found.</short>
|
|
</element>
|
|
<element name="TCustomListBox.GetIndexAtY.Y">
|
|
<short>The vertical client coordinate.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.GetSelectedText">
|
|
<short>Get the text for all selected items as a string value.</short>
|
|
<descr>
|
|
<p>
|
|
<var>GetSelectedText</var> is a <var>String</var> function used to retrieve a
|
|
string with all selected items in the control. The return values uses each
|
|
selected entry in Items separated by the LineEnding character sequence for
|
|
the platform or operating system. The return value is an empty string ('')
|
|
when <var>ItemIndex</var> does not contain a positive non-zero value (no item
|
|
is selected) or <var>SelCount</var> contain 0 (zero).
|
|
</p>
|
|
<p>
|
|
GetSelectedText iterates over the values in Items, and includes the string
|
|
when its <var>Selected</var> property is set to <b>True</b>. This is useful
|
|
when <var>MultiSelect</var> is enabled for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.Selected"/>
|
|
<link id="TCustomListBox.MultiSelect"/>
|
|
<link id="TCustomListBox.SelCount"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.GetSelectedText.Result">
|
|
<short>The item strings, one per line.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.ItemAtPos">
|
|
<short>Get the item index for the given client coordinates.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ItemAtPos</var> is an <var>Integer</var> function used to get the index
|
|
position in Items for the value at the specified screen coordinates.
|
|
</p>
|
|
<p>
|
|
<var>Pos</var> is <var>TPoint</var> instance with the X and Y coordinates
|
|
used in the method.
|
|
</p>
|
|
<p>
|
|
<var>Existing</var> indicates whether the return value is set to -1 or the
|
|
number of entries in <var>Items</var> when Pos refers to entry which does not
|
|
exist. When Existing is set to <b>True</b>, -1 is returned for an invalid
|
|
entry. Otherwise, the value in <var>Item.Count</var> is returned.
|
|
</p>
|
|
<p>
|
|
ItemAtPos calls <var>GetIndexAtXY</var> using the X and Y values in Pos to
|
|
locate the index for the item.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.GetIndexAtXY"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.ItemAtPos.Result">
|
|
<short>The calculated item index, can be out of the Items bounds.</short>
|
|
</element>
|
|
<element name="TCustomListBox.ItemAtPos.Pos">
|
|
<short>The item position.</short>
|
|
</element>
|
|
<element name="TCustomListBox.ItemAtPos.Existing">
|
|
<short>
|
|
<b>True</b> when the index is requested for insertion of a new item.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.ItemRect">
|
|
<short>
|
|
Returns the client rectangle for an item (including scrollbar area).
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Index</var> must be in the range 0 to <var>ItemCount</var> to be
|
|
considered valid. The result is valid also for the next item, that will be
|
|
added subsequently.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomListBox.ItemRect.Result">
|
|
<short>The item area; all zeroes for an invalid item index.</short>
|
|
</element>
|
|
<element name="TCustomListBox.ItemRect.Index">
|
|
<short>The tentative item index.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.ItemVisible">
|
|
<short>
|
|
Returns <b>True</b> if the item is at least partially visible in the
|
|
scrollable list.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>ItemVisible</var> is a <var>Boolean</var> function used to determine if
|
|
the item at the position in <var>Index</var> is at least partially visible in
|
|
the list box control. The return value is <b>False</b> for the following
|
|
conditions:
|
|
</p>
|
|
<ul>
|
|
<li>Index is out of range for the values in Items.</li>
|
|
<li>An item rectangle could not be retrieved from the widgetset class.</li>
|
|
<li>
|
|
The item rectangle is invalid for the control (where Bottom < 0 or Top
|
|
> ClientHeight).
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
Use <var>ItemFullyVisible</var> to determine if the specified list box item
|
|
is fully visible in the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.ItemFullyVisible"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.ItemVisible.Result">
|
|
<short>
|
|
<b>True</b> when the specified item is at least partially visible in the
|
|
control.
|
|
</short>
|
|
</element>
|
|
<element name="TCustomListBox.ItemVisible.Index">
|
|
<short>Ordinal position for the item examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.ItemFullyVisible">
|
|
<short>
|
|
Returns <b>True</b> if the item is fully visible in the scrollable list.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>ItemFullyVisible</var> is a <var>Boolean</var> function used to
|
|
determine the item at the position in <var>Index</var> is fully visible in
|
|
the list box control. The return value is <b>False</b> under the following
|
|
conditions:
|
|
</p>
|
|
<ul>
|
|
<li>Index is out of range for the values in Items.</li>
|
|
<li>An item rectangle could not be retrieved from the widgetset class.</li>
|
|
<li>
|
|
The item rectangle is invalid or obscured in the control (where Top < 0 or
|
|
Bottom > ClientHeight).
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
Use <var>ItemVisible</var> to determine if the specified item is at least
|
|
partially visible in the list box control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.ItemVisible"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.ItemFullyVisible.Result">
|
|
<short>
|
|
<b>True</b> when the specified item is fully visible in the list box control.
|
|
</short>
|
|
</element>
|
|
<element name="TCustomListBox.ItemFullyVisible.Index">
|
|
<short>Ordinal position for the item examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.LockSelectionChange">
|
|
<short>Blocks selection changes during update to the widgetset class.</short>
|
|
<descr>
|
|
<p>
|
|
Increments the internal counter used to track selection change events. Used
|
|
in the implementation of the <var>AssignCacheToItemData</var>,
|
|
<var>InitializeWnd</var>, <var>FinalizeWnd</var>,
|
|
<var>UpdateSelectionMode</var>, <var>UpdateSorted</var>, and
|
|
<var>SetItems</var> methods.
|
|
</p>
|
|
<p>
|
|
The value is examined when the <b>LM_SelChange</b> message is handled for the
|
|
control.
|
|
</p>
|
|
<p>
|
|
<var>UnlockSelectionChange</var> is used to decrement the internal counter.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.UnlockSelectionChange"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.MakeCurrentVisible">
|
|
<short>
|
|
Makes the item at ItemIndex visible, possibly scrolling the list.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>MakeCurrentVisible</var> is a procedure used to ensure that the current
|
|
item selected in the control is also visible. The current selection is the
|
|
value in Items stored at the position in ItemIndex. No actions are performed
|
|
in the method when ItemIndex is out of bounds.
|
|
</p>
|
|
<p>
|
|
MakeCurrentVisible calls <var>ItemFullyVisible</var> to determine if the item
|
|
at <var>ItemIndex</var> is already visible in the scrollable list. No
|
|
additional actions are needed in the method when the item is already visible.
|
|
Otherwise, the value in ItemIndex is assigned to the <var>TopIndex</var>
|
|
property which causes the selected item to scroll to the top of the visible
|
|
area in the list box.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.ItemIndex"/>
|
|
<link id="TCustomListBox.ItemFullyVisible"/>
|
|
<link id="TCustomListBox.ItemVisible"/>
|
|
<link id="TCustomListBox.TopIndex"/>
|
|
<link id="TCustomListBox.Items"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.MeasureItem">
|
|
<short>Gets the height for an item in the list.</short>
|
|
<descr>
|
|
<p>
|
|
<var>MeasureItem</var> is a procedure used to get the height for an item
|
|
displayed in the list box control.
|
|
</p>
|
|
<p>
|
|
<var>Integer</var> is the ordinal position in <var>Items</var> for the value
|
|
measured in the method.
|
|
</p>
|
|
<p>
|
|
<var>TheHeight</var> is a variable parameter which contains the calculated
|
|
height for the text in the item. The value on entry is the text height for
|
|
the current font calculated using the <var>Canvas</var> for the control. The
|
|
value returned in TheHeight is assigned to the <var>ItemHeight</var> property
|
|
when it is a non-zero value.
|
|
</p>
|
|
<p>
|
|
MeasureItems signals the <var>OnMeasureItem</var> event handler (when
|
|
assigned) using the arguments passed to the method. An application must
|
|
implement an object procedure to calculate the height for the requested item
|
|
using the logic required.
|
|
</p>
|
|
<p>
|
|
MeasureItem is called when the <b>LM_MeasureItem</b> message is handled for
|
|
the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.OnMeasureItem"/>
|
|
<link id="TCustomListBox.ItemHeight"/>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.Font"/>
|
|
<link id="TCustomListBox.Canvas"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.MeasureItem.Index">
|
|
<short>
|
|
Ordinal position in Items for the string examined in the method.
|
|
</short>
|
|
</element>
|
|
<element name="TCustomListBox.MeasureItem.TheHeight">
|
|
<short>
|
|
The height of the item in pixels, can be changed by the event handler.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SelectAll">
|
|
<short>Selects all items in the list (in ExtendedSelect mode).</short>
|
|
<descr>
|
|
<p>
|
|
<var>SelectAll</var> is a procedure used to mark all of the values defined in
|
|
the <var>Items</var> property as <var>Selected</var>. No actions are
|
|
performed in the method when Items is empty (Count is 0). SelectAll calls the
|
|
<var>SelectRange</var> method to select items at position 0 (zero) through
|
|
Count-1 (inclusive).
|
|
</p>
|
|
<p>
|
|
Use Selected to change the selection state for an individual item when
|
|
<var>MultiSelect</var> is enabled. Set <var>ItemIndex</var> to -1 to clear
|
|
the current selection when MultiSelect is not used.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.ExtendedSelect"/>
|
|
<link id="TCustomListBox.SelectRange"/>
|
|
<link id="TCustomListBox.Count"/>
|
|
<link id="TCustomListBox.Selected"/>
|
|
<link id="TCustomListBox.MultiSelect"/>
|
|
<link id="TCustomListBox.ItemIndex"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SelectRange">
|
|
<short>
|
|
Changes the selection state for a range of Items in the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>SelectRange</var> is a procedure used to change the selection state for
|
|
a range of <var>Items</var> in the list box control to the value specified in
|
|
<var>ASelected</var>.
|
|
</p>
|
|
<p>
|
|
<var>ALow</var> and <var>AHigh</var> contain the ordinal positions in Items
|
|
affected in the method. ALow must be a positive integer value or zero
|
|
(<b>0</b>). AHigh must be less than the value in the Count property for
|
|
Items. When either value is out of range, no actions are performed in the
|
|
method.
|
|
</p>
|
|
<p>
|
|
When <var>MultiSelect</var> is set to <b>True</b>, the widgetset class is
|
|
notified of the changes to item selection state and
|
|
<var>DoSelectionChange</var> is called to trigger the
|
|
<var>OnSelectionChange</var> event handler (when assigned). No actions are
|
|
performed in the method when MultiSelect is set to <b>False</b>.
|
|
</p>
|
|
<p>
|
|
SelectRange is similar to the <var>SelectAll</var> method, but limits the
|
|
affected items to the specified range of values - and only when MultiSelect
|
|
is enabled.
|
|
</p>
|
|
<p>
|
|
Use <var>SelCount</var> to determine the number of Items selected in the
|
|
control when MultiSelect is enabled.
|
|
</p>
|
|
<p>
|
|
Use <var>Selected</var> to maintain the selection state for a single entry in
|
|
the Items property.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.SelectAll"/>
|
|
<link id="TCustomListBox.DoSelectionChange"/>
|
|
<link id="TCustomListBox.OnSelectionChange"/>
|
|
<link id="TCustomListBox.ClickOnSelChange"/>
|
|
<link id="TCustomListBox.Selected"/>
|
|
<link id="TCustomListBox.SelCount"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.SelectRange.ALow">
|
|
<short>Ordinal position for the initial item changed in the method.</short>
|
|
</element>
|
|
<element name="TCustomListBox.SelectRange.AHigh">
|
|
<short>Ordinal position for the final item changed in the method.</short>
|
|
</element>
|
|
<element name="TCustomListBox.SelectRange.ASelected">
|
|
<short>
|
|
<b>True</b> if the items are selected; <b>False</b> when they are unselected.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.DeleteSelected">
|
|
<short>Removes one or more selected entries from the Items property.</short>
|
|
<descr>
|
|
<p>
|
|
<var>DeleteSelected</var> is a procedure used to delete one or more entries
|
|
in the <var>Items</var> property based on their selection state.
|
|
</p>
|
|
<p>
|
|
DeleteSelected uses the value in <var>MultiSelect</var> to determine if
|
|
multiple values in Items are examined and removed. When MultiSelect is
|
|
<b>True</b>, the values in Items are visited in reverse order and the Delete
|
|
method in Items is called if the item is <var>Selected</var>. When
|
|
MultiSelect is not enabled, the value in the <var>ItemIndex</var> property is
|
|
used to examine a single entry and remove it when it is Selected.
|
|
</p>
|
|
<p>
|
|
No values are removed from Items when none of the entries in Selected are
|
|
<b>True</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.Selected"/>
|
|
<link id="TCustomListBox.MultiSelect"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.UnlockSelectionChange">
|
|
<short>Removes a previous selection change lock.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.Align" link="#lcl.controls.TControl.Align"/>
|
|
<element name="TCustomListBox.Anchors" link="#lcl.controls.TControl.Anchors"/>
|
|
|
|
<element name="TCustomListBox.BorderStyle">
|
|
<short>Line style used for the border on the control.</short>
|
|
<descr>
|
|
<p>
|
|
Indicates the line style drawn as a border around the control. The default
|
|
value for the property is bsSingle in TCustomListBox.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.BorderStyle">TWinControl.BorderStyle</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.Canvas">
|
|
<short>Drawing surface where the control is drawn.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Canvas</var> is a read-only <var>TCanvas</var> property with the drawing
|
|
surface where the control is drawn.
|
|
</p>
|
|
<p>
|
|
Its value is assigned the constructor for the class instance, and uses a
|
|
<var>TControlCanvas</var> instance to maintain an association between the
|
|
control and its device context. It is freed when the control is destroyed.
|
|
</p>
|
|
<p>
|
|
Values in the <var>Font</var> and <var>Brush</var> properties are assigned to
|
|
Canvas, and used to measure and draw the Items for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.DrawItem"/>
|
|
<link id="TCustomListBox.MeasureItem"/>
|
|
<link id="#lcl.controls.TWinControl.Brush">TWinControl.Brush</link>
|
|
<link id="#lcl.controls.TControl.Font">TControl.Font</link>
|
|
<link id="#lcl.controls.TControlCanvas">TControlCanvas</link>
|
|
<link id="#lcl.graphics.TCanvas">TCanvas</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.ClickOnSelChange">
|
|
<short>Allows selection changes to generate a Click event.</short>
|
|
<descr>
|
|
<p>
|
|
Delphi generates an <var>OnClick</var> event when the selection changes. The
|
|
LCL adds a more specific <var>OnSelectionChange</var> event.
|
|
</p>
|
|
<p>
|
|
Set <var>ClickOnSelChange</var> to <b>False</b> when selection changes should
|
|
be handled by the OnSelectionChange event, and should not generate an OnClick
|
|
event. Setting ClickOnSelChange to <b>True</b> gives the Delphi compatible
|
|
behavior. The default value for the property is <b>True</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.OnClick"/>
|
|
<link id="TCustomListBox.OnSelectionChange"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.Columns">
|
|
<short>
|
|
The number of visible columns displayed on the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
A list box can have multiple columns, as well as multiple rows. When
|
|
<var>Columns</var> is greater than 0 (zero), it specifies the number of
|
|
columns that are visible without horizontal scrolling. i. e. the width of a
|
|
single column becomes Width/Columns. Setting a new value for Columns causes
|
|
the widgetset class to be notified when a handle has been allocated for the
|
|
control.
|
|
</p>
|
|
<remark>
|
|
The Columns property is not supported for the macOS Carbon, Cocoa, GTK2, QT4, QT5, and QT6 widgetsets.
|
|
</remark>
|
|
</descr>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.Constraints" link="#lcl.controls.TControl.Constraints"/>
|
|
|
|
<element name="TCustomListBox.Count">
|
|
<short>The number of items defined in the scrollable list box.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Count</var> is a read-only <var>Integer</var> property which indicates
|
|
the number of <var>Items</var> defined in the control. Count is provided for
|
|
Delphi compatibility, and redirects access to the Count property in Items.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.ExtendedSelect">
|
|
<short>
|
|
<b>True</b> when a contiguous range of items can be selected using
|
|
Shift+Click. The default value is <b>True</b>.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
Normally a click into the list selects one item, and deselects all other
|
|
items.
|
|
</p>
|
|
<p>
|
|
When <var>MultiSelect</var> is <b>True</b>, the user can select/deselect
|
|
further items with Ctrl+Click.
|
|
</p>
|
|
<p>
|
|
When <var>ExtendedSelect</var> is also <b>True</b>, the user can Shift-click
|
|
on an item, to select all items between this and the last selected item.
|
|
</p>
|
|
</descr>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.Font" link="#lcl.controls.TControl.Font"/>
|
|
|
|
<element name="TCustomListBox.IntegralHeight">
|
|
<short>
|
|
Not implemented: shrink the Height of the widget, so that it only shows fully
|
|
visible rows.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.ItemHeight">
|
|
<short>The default height for an item displayed in the list.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ItemHeight</var> is an <var>Integer</var> property which contains the
|
|
default height for an item displayed in the list box control. For a list box
|
|
using the <b>lbStandard</b> <var>Style</var>, the property value is derived
|
|
using the dimensions in the <var>ItemRect</var> for the item stored at
|
|
<var>TopIndex</var>. For other styles, the stored property`value is used.
|
|
Setting a new value for the property causes the <var>RecreateWnd</var> method
|
|
to be called when a handle has been allocated for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.ItemRect"/>
|
|
<link id="TCustomListBox.TopIndex"/>
|
|
<link id="TCustomListBox.CalculateStandardItemHeight"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.ItemIndex">
|
|
<short>Ordinal position for the currently selected item, -1 if none.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ItemIndex</var> is an <var>Integer</var> property which contains the
|
|
position for the current selection in the control. If <var>MultiSelect</var>
|
|
is <b>True</b>, ItemIndex represents the selected item which also has focus.
|
|
Use the <var>Selected</var> property to access individual items when
|
|
MultiSelect is enabled.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox"/>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.MultiSelect"/>
|
|
<link id="TCustomListBox.ExtendedSelect"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.Items">
|
|
<short>The list of all items defined in the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Items</var> is a <var>TStrings</var> property which contains the string
|
|
values (and associated objects) displayed in the list box control. Reading
|
|
allows access to the contents of the list (TStrings compatible). Assign
|
|
another string list to the property to replace the Items in the control.
|
|
Internally, Items is cast to a <var>TExtendedStringList</var> type to access
|
|
the item attribute data for the entries.
|
|
</p>
|
|
<p>
|
|
Use <var>ItemIndex</var> to access the selected item in the list box control.
|
|
Use the <var>Selected</var> property to select or de-select values in Items
|
|
when <var>MultiSelect</var> is enabled. Use <var>SelectRange</var> to select
|
|
a range of Items in the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.ItemIndex"/>
|
|
<link id="TCustomListBox.Selected"/>
|
|
<link id="TCustomListBox.MultiSelect"/>
|
|
<link id="TCustomListBox.SelectRange"/>
|
|
<link id="#rtl.classes.TStrings">TStrings</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.MultiSelect">
|
|
<short>Allows selection of more than one item from the list.</short>
|
|
<descr>
|
|
<p>
|
|
<var>MultiSelect</var> is a <var>Boolean</var> property which indicates if
|
|
multiple values in <var>Items</var> can be selected using the Ctrl+Click
|
|
mouse button, or by setting values in the indexed <var>Selected</var>
|
|
property. When set to <b>True</b>, selection state is determined by reading /
|
|
writing the cached item data for the Selected items in the widgetset class.
|
|
When set to <b>False</b>, the value in <var>ItemIndex</var> is used to
|
|
determine the selected item.
|
|
</p>
|
|
<p>
|
|
The default value for the property is <b>False</b>. Setting a new value for
|
|
the property causes <var>UpdateSelectionMode</var> to be called to notify the
|
|
widgetset class of the change.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.ExtendedSelect"/>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.ItemIndex"/>
|
|
<link id="TCustomListBox.MultiSelect"/>
|
|
<link id="TCustomListBox.Selected"/>
|
|
<link id="TCustomListBox.SelectRange"/>
|
|
<link id="TCustomListBox.DeleteSelected"/>
|
|
<link id="TCustomListBox.ClearSelection"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.OnChangeBounds" link="#lcl.controls.TControl.OnChangeBounds"/>
|
|
<element name="TCustomListBox.OnClick" link="#lcl.controls.TControl.OnClick"/>
|
|
<element name="TCustomListBox.OnDblClick" link="#lcl.controls.TControl.OnDblClick"/>
|
|
|
|
<element name="TCustomListBox.OnDrawItem">
|
|
<short>Handler for painting of a list item in owner-draw mode.</short>
|
|
<descr>
|
|
<p>
|
|
<var>OnDrawItem</var> is a <var>TDrawItemEvent</var> property with the event
|
|
handler signalled to render a list item when an owner-drawn method is used in
|
|
the <var>Style</var> property. OnDrawItem is signalled (when assigned) from
|
|
the <var>DrawItem</var> method. DrawItem provides the arguments for the event
|
|
handler.
|
|
</p>
|
|
<p>
|
|
An application should implement an object procedure to respond to the event
|
|
notification. Use the Canvas for the control to get text metrics or render
|
|
the control and any graphic images. An internal drawing routine which uses
|
|
the Font, Color, Layout and Alignment in the control is called when
|
|
OnDrawItem has not been assigned.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Style"/>
|
|
<link id="TCustomListBox.DrawItem"/>
|
|
<link id="TCustomListBox.Canvas"/>
|
|
<link id="TCustomListBox.Font"/>
|
|
<link id="TCustomListBox.Align"/>
|
|
<link id="TListBoxStyle"/>
|
|
<link id="TDrawItemEvent"/>
|
|
<link id="#lcl.controls.TControl.Color">TControl.Color</link>
|
|
<link id="#lcl.graphics.TCanvas.TextStyle">TCanvas.TextStyle</link>
|
|
<link id="#lcl.graphics.TTextStyle">TTextStyle</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.OnEnter" link="#lcl.controls.TWinControl.OnEnter"/>
|
|
<element name="TCustomListBox.OnExit" link="#lcl.controls.TWinControl.OnExit"/>
|
|
<element name="TCustomListBox.OnKeyDown" link="#lcl.controls.TWinControl.OnKeyDown"/>
|
|
<element name="TCustomListBox.OnKeyPress" link="#lcl.controls.TWinControl.OnKeyPress"/>
|
|
<element name="TCustomListBox.OnKeyUp" link="#lcl.controls.TWinControl.OnKeyUp"/>
|
|
|
|
<element name="TCustomListBox.OnMeasureItem">
|
|
<short>Handler invoked when the height for an item is needed.</short>
|
|
<descr>
|
|
<p>
|
|
<var>OnMeasureItem</var> is a <var>TMeasureItemEvent</var> property with the
|
|
event handler signalled to get the height for specified item in the list box
|
|
control. OnMeasureItem is signalled (when assigned) from the
|
|
<var>MeasureItem</var> method, and occurs when the <b>LM_MeasureItem</b>
|
|
message is handled for the control. MeasureItem provides the arguments passed
|
|
to the event handler, while the message handler stores the calculated height
|
|
in <var>ItemHeight</var> when it is not 0 (zero).
|
|
</p>
|
|
<p>
|
|
An application must implement an object procedure to respond to the event
|
|
notification. <var>Index</var> contains the position in <var>Items</var> with
|
|
the string to examine in the event handler. On entry, <var>TheHeight</var>
|
|
contains the text height for the current <var>Font</var> calculated using the
|
|
<var>Canvas</var> in the control. The value in TheHeight can be updated with
|
|
the value derived in the event handler.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.MeasureItem"/>
|
|
<link id="TCustomListBox.ItemHeight"/>
|
|
<link id="TCustomListBox.Style"/>
|
|
<link id="TCustomListBox.Font"/>
|
|
<link id="TCustomListBox.Canvas"/>
|
|
<link id="TMeasureItemEvent"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.OnMouseDown" link="#lcl.controls.TControl.OnMouseDown"/>
|
|
<element name="TCustomListBox.OnMouseMove" link="#lcl.controls.TControl.OnMouseMove"/>
|
|
<element name="TCustomListBox.OnMouseUp" link="#lcl.controls.TControl.OnMouseUp"/>
|
|
<element name="TCustomListBox.OnMouseEnter" link="#lcl.controls.TControl.OnMouseEnter"/>
|
|
<element name="TCustomListBox.OnMouseLeave" link="#lcl.controls.TControl.OnMouseLeave"/>
|
|
<element name="TCustomListBox.OnMouseWheel" link="#lcl.controls.TControl.OnMouseWheel"/>
|
|
<element name="TCustomListBox.OnMouseWheelDown" link="#lcl.controls.TControl.OnMouseWheelDown"/>
|
|
<element name="TCustomListBox.OnMouseWheelUp" link="#lcl.controls.TControl.OnMouseWheelUp"/>
|
|
<element name="TCustomListBox.OnResize" link="#lcl.controls.TControl.OnResize"/>
|
|
|
|
<element name="TCustomListBox.OnSelectionChange">
|
|
<short>Handler invoked when an item is selected in the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>OnSelectionChange</var> is a <var>TSelectionChangeEvent</var> property
|
|
with the event handler signalled when a selection is changed in the list box
|
|
control. OnSelectionChange is signalled (when assigned) from the
|
|
<var>DoSelectionChange</var> method, and occurs prior to calling the
|
|
<var>Click</var> method for the control.
|
|
</p>
|
|
<p>
|
|
The <var>User</var> argument indicates whether the selection change results
|
|
from user interaction with the control (<b>True</b>), or from code or methods
|
|
called at run-time (<b>False</b>).
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.DoSelectionChange"/>
|
|
<link id="TCustomListBox.Click"/>
|
|
<link id="TCustomListBox.ClickOnSelChange"/>
|
|
<link id="TCustomListBox.SelectRange"/>
|
|
<link id="TCustomListBox.MultiSelect"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.ParentColor">
|
|
<short>Use the Color from the Parent control, when enabled.</short>
|
|
<descr>
|
|
<p>
|
|
ParentColor determines if the control should use the Color from the Parent
|
|
control, when enabled. The default value for the property is <b>False</b> in
|
|
TCustomListBox.
|
|
</p>
|
|
<p>
|
|
When this property is <b>True</b>, all changes to the Color of the parent
|
|
will also be applied to the Color of the control, ensuring that they both
|
|
contain same value. If the Color of the control is changed by the
|
|
application, then ParentColor will be automatically set to <b>False</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.ParentColor">TControl.ParentColor</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.ParentFont" link="#lcl.controls.TControl.ParentFont"/>
|
|
<element name="TCustomListBox.ParentShowHint" link="#lcl.controls.TControl.ParentShowHint"/>
|
|
<element name="TCustomListBox.PopupMenu" link="#lcl.controls.TControl.PopupMenu"/>
|
|
|
|
<element name="TCustomListBox.ScrollWidth">
|
|
<short>The virtual width of the list box, in pixels.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ScrollWidth</var> is an <var>Integer</var> property with the logical
|
|
horizontal extent for the list box, or the scrollable area inside the
|
|
control. When ScrollWidth is set to a value larger than
|
|
<var>ClientWidth</var>, the horizontal scrollbar is displayed for the control.
|
|
</p>
|
|
<p>
|
|
The value for ScrollWidth is read from the widgetset class (at run-time) when
|
|
a Handle has been allocated for the control. Changing the value for the
|
|
property causes the value in the widgetset class to be updated.
|
|
</p>
|
|
<p>
|
|
The default value for the property is <b>0</b> (<b>zero</b>).
|
|
</p>
|
|
<p>
|
|
Use <var>Columns</var> to set the number of adjacent vertical columns used to
|
|
display the items in the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Columns"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.SelCount">
|
|
<short>
|
|
The number of selected items in the list box control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>SelCount</var> is a read-only <var>Integer</var> property which contains
|
|
the number of <var>Items</var> selected in the list box control. The property
|
|
value is the result returned by the <var>GetSelCount</var> method
|
|
in the widgetset class when its Handle has been allocated.
|
|
</p>
|
|
<p>
|
|
If the widget Handle is unassigned, the property value is determined using
|
|
either the value in ItemIndex or the list items in the local cache. If
|
|
MultiSelect has not been enabled, the property value is either 0 or 1; 0 when
|
|
<b>ItemIndex = -1</b> and 1 when <b>ItemIndex > -1</b>. If MultiSelect is
|
|
<b>True</b>, the local item cache is searched to get the number of items
|
|
selected in the control. The value is 0 if the local cache is invalid or none
|
|
of the cached items are in the selected state.
|
|
</p>
|
|
<p>
|
|
Use <var>Selected</var> to get or set the selected state for an item on the
|
|
control.
|
|
</p>
|
|
<p>
|
|
Use <var>SelectRange</var> to set or reset the selected state for Items in a
|
|
specified range of positions.
|
|
</p>
|
|
<p>
|
|
Use <var>SelectAll</var> to select all Items in the control.
|
|
</p>
|
|
<p>
|
|
Use <var>ClearSelection</var> to remove all item selections in the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Selected"/>
|
|
<link id="TCustomListBox.ItemIndex"/>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.MultiSelect"/>
|
|
<link id="TCustomListBox.SelectRange"/>
|
|
<link id="TCustomListBox.SelectAll"/>
|
|
<link id="TCustomListBox.ClearSelection"/>
|
|
<link id="TCustomListBox.ExtendedSelect"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.Selected">
|
|
<short>The Selected state for an item in the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Selected</var> is an indexed <var>Boolean</var> property used to set the
|
|
selection state for an item defined in the list box control.
|
|
</p>
|
|
<p>
|
|
The index value is the ordinal position in <var>Items</var> with the
|
|
selection state value. Read and write access for the property value call the
|
|
<var>CheckIndex</var> method to verify that the index is in bounds for the
|
|
defined Items in the control. CheckIndex raises an exception if an index
|
|
value is not in the required range.
|
|
</p>
|
|
<p>
|
|
Property values are read from the widgetset class when it has been created,
|
|
or from the cached selection values when it has not. Write access ensures
|
|
that <var>ItemIndex</var> is updated as needed, and notifies the widgetset
|
|
class and/or the item selection cache when a value is changed.
|
|
</p>
|
|
<p>
|
|
Use <var>SelectAll</var> to set the selection state for all Items in the
|
|
control.
|
|
</p>
|
|
<p>
|
|
Use <var>SelectRange</var> to set the selection state for Items in the
|
|
specified range of positions in the control.
|
|
</p>
|
|
<p>
|
|
Use <var>ClearSelection</var> to reset the selection state for all Items in
|
|
the list box control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.CheckIndex"/>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.ItemIndex"/>
|
|
<link id="TCustomListBox.SelectAll"/>
|
|
<link id="TCustomListBox.SelectRange"/>
|
|
<link id="TCustomListBox.ClearSelection"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomListBox.Selected.Index">
|
|
<short>Ordinal position in the item list.</short>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.ShowHint" link="#lcl.controls.TControl.ShowHint"/>
|
|
|
|
<element name="TCustomListBox.Sorted">
|
|
<short>
|
|
Determines whether the list entries are sorted in alphanumeric order.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Sorted</var> is a <var>Boolean</var> property which determines whether
|
|
the values in <var>Items</var> are sorted and stored in alphanumeric order in
|
|
the control.
|
|
</p>
|
|
<p>
|
|
Setting this property to <b>True</b> enables use of ascending alphanumeric
|
|
case-insensitive sorting of items in the list. When <b>True</b>, new entries
|
|
are added in sort order, and are not necessarily stored at the end of the
|
|
list.
|
|
</p>
|
|
<p>
|
|
Setting a new value for the property causes the private
|
|
<var>UpdateSorted</var> method to be called to notify the widgetset class of
|
|
the change in order, or to update the <var>Sorted</var> property in
|
|
<var>Items</var> when needed.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.AddItem"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.Style">
|
|
<short>
|
|
Appearance of the list box (standard, owner-draw fixed, or owner-draw
|
|
variable).
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Style</var> is a <var>TListBoxStyle</var> property which controls the
|
|
appearance of the <var>Items</var> drawn in the list box control. The default
|
|
value for the property is <var>lbStandard</var>, and causes the appearance
|
|
and text height native to the widgetset to be used. When another value from
|
|
TListBoxStyle is used, Items are drawn using the routine assigned to the
|
|
<var>OnDrawItem</var> event handler.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.ItemHeight"/>
|
|
<link id="TCustomListBox.OnDrawItem"/>
|
|
<link id="TListBoxStyle"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.TabOrder" link="#lcl.controls.TWinControl.TabOrder"/>
|
|
|
|
<element name="TCustomListBox.TabStop">
|
|
<short>Enables keyboard navigation using the Tab or Shift+Tab keys.</short>
|
|
<descr>
|
|
<p>
|
|
Allows the user to navigate to this control, by pressing the Tab or Shift+Tab
|
|
keys.
|
|
The default value for the property is <b>True</b> in
|
|
<var>TCustomListBox</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.TabStop">TWinControl.TabStop</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.TopIndex">
|
|
<short>Index of the first visible (or top-most) item.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TopIndex</var> is an <var>Integer</var> property which contains the
|
|
ordinal position in <var>Items</var> for the first visible list item in the
|
|
scrollable control. The default value for the property is <b>0</b> (the first
|
|
value in Items).
|
|
</p>
|
|
<p>
|
|
The property value is retrieved from the widgetset class when a handle has
|
|
been allocated for the control. Setting a new value for the property causes
|
|
the widgetset class to be notified of the value change when a handle has been
|
|
allocated for the control.
|
|
</p>
|
|
<p>
|
|
The value in TopIndex is updated in the <var>MakeCurrentVisible</var> method
|
|
where the current selection in <var>ItemIndex</var> is assigned to the
|
|
property.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.Items"/>
|
|
<link id="TCustomListBox.ItemHeight"/>
|
|
<link id="TCustomListBox.MakeCurrentVisible"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.OnUTF8KeyPress" link="#lcl.controls.TWinControl.OnUTF8KeyPress"/>
|
|
|
|
<element name="TCustomListBox.Options">
|
|
<short>Contains options enabled for the list box control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Options</var> is a <var>TListBoxOptions</var> property with the options
|
|
enabled for the list box control. The values in the property are assigned in
|
|
the <var>Create</var> constructor, and used when the
|
|
<var>LM_DrawListItem</var> message is handled for the control.
|
|
</p>
|
|
<p>
|
|
The default value for the property is <b>[lboDrawFocusRect]</b>, and draws a
|
|
focus rectangle for the selected item in the list box.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomListBox.Visible" link="#lcl.controls.TControl.Visible"/>
|
|
|
|
<element name="TListBox">
|
|
<short>Control which displays a scrollable list of strings.</short>
|
|
<descr>
|
|
<p>
|
|
The strings are stored in the <var>Items</var> list.
|
|
</p>
|
|
<p>
|
|
At design time, a click on the ellipsis character (<b>...</b>) next to the
|
|
<var>Items</var> entry in the Object Inspector opens a string-list editor in
|
|
which the individual text-strings for the list items can be entered or
|
|
edited. The editor also allows the entries to be sorted alphabetically in
|
|
normal or reverse order.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TComboBox"/>
|
|
<link id="HowToUseStdCtrls"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TListBox.Align" link="#lcl.controls.TControl.Align"/>
|
|
<element name="TListBox.Anchors" link="#lcl.controls.TControl.Anchors"/>
|
|
<element name="TListBox.BidiMode" link="#lcl.controls.TControl.BiDiMode"/>
|
|
<element name="TListBox.BorderSpacing" link="#lcl.controls.TControl.BorderSpacing"/>
|
|
<element name="TListBox.BorderStyle" link="#lcl.stdctrls.TCustomListBox.BorderStyle"/>
|
|
<element name="TListBox.ClickOnSelChange" link="#lcl.stdctrls.TCustomListBox.ClickOnSelChange"/>
|
|
<element name="TListBox.Color" link="#lcl.controls.TControl.Color"/>
|
|
<element name="TListBox.Columns" link="#lcl.stdctrls.TCustomListBox.Columns"/>
|
|
<element name="TListBox.Constraints" link="#lcl.controls.TControl.Constraints"/>
|
|
<element name="TListBox.DoubleBuffered" link="#lcl.controls.TWinControl.DoubleBuffered"/>
|
|
<element name="TListBox.DragCursor" link="#lcl.controls.TControl.DragCursor"/>
|
|
<element name="TListBox.DragKind" link="#lcl.controls.TControl.DragKind"/>
|
|
<element name="TListBox.DragMode" link="#lcl.controls.TControl.DragMode"/>
|
|
<element name="TListBox.ExtendedSelect" link="#lcl.stdctrls.TCustomListBox.ExtendedSelect"/>
|
|
<element name="TListBox.Enabled" link="#lcl.controls.TControl.Enabled"/>
|
|
<element name="TListBox.Font" link="#lcl.controls.TControl.Font"/>
|
|
<element name="TListBox.IntegralHeight" link="#lcl.stdctrls.TCustomListBox.IntegralHeight"/>
|
|
<element name="TListBox.Items" link="#lcl.stdctrls.TCustomListBox.Items"/>
|
|
|
|
<element name="TListBox.ItemHeight">
|
|
<short>Get or set the height of a single item in the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ItemHeight</var> is an <var>Integer</var> property which contains the
|
|
height used to render the <var>Items</var> in the control.
|
|
</p>
|
|
<p>
|
|
The property value is used when the drawing <var>Style</var> for the control
|
|
is set to <var>lbStandard</var>, or when the handle has not been allocated
|
|
for the control. For other drawing styles, the property value is determined
|
|
using the item rectangle used for the first visible item in the list or by
|
|
using the <var>OnMeasureItem</var> event handler.
|
|
</p>
|
|
<p>
|
|
Changing the value for the property causes <var>RecreateWnd</var> to be
|
|
called to re-create the widgetset handle for the control.
|
|
</p>
|
|
<p>
|
|
The value in ItemHeight may be scaled when <var>AutoAdjustLayout</var> is
|
|
called using a layout policy that includes auto-adjustment for display
|
|
density.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomListBox.ItemHeight"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TListBox.ItemIndex" link="#lcl.stdctrls.TCustomListBox.ItemIndex"/>
|
|
<element name="TListBox.MultiSelect" link="#lcl.stdctrls.TCustomListBox.MultiSelect"/>
|
|
<element name="TListBox.ParentBidiMode" link="#lcl.controls.TControl.ParentBiDiMode"/>
|
|
<element name="TListBox.ParentColor" link="#lcl.stdctrls.TCustomListBox.ParentColor"/>
|
|
<element name="TListBox.ParentDoubleBuffered" link="#lcl.controls.TWinControl.ParentDoubleBuffered"/>
|
|
<element name="TListBox.ParentShowHint" link="#lcl.controls.TControl.ParentShowHint"/>
|
|
<element name="TListBox.ParentFont" link="#lcl.controls.TControl.ParentFont"/>
|
|
<element name="TListBox.PopupMenu" link="#lcl.controls.TControl.PopupMenu"/>
|
|
<element name="TListBox.ScrollWidth" link="#lcl.stdctrls.TCustomListBox.ScrollWidth"/>
|
|
<element name="TListBox.ShowHint" link="#lcl.controls.TControl.ShowHint"/>
|
|
<element name="TListBox.Sorted" link="#lcl.stdctrls.TCustomListBox.Sorted"/>
|
|
<element name="TListBox.Style" link="#lcl.stdctrls.TCustomListBox.Style"/>
|
|
<element name="TListBox.TabOrder" link="#lcl.controls.TWinControl.TabOrder"/>
|
|
<element name="TListBox.TabStop" link="#lcl.stdctrls.TCustomListBox.TabStop"/>
|
|
<element name="TListBox.TopIndex" link="#lcl.stdctrls.TCustomListBox.TopIndex"/>
|
|
<element name="TListBox.Visible" link="#lcl.controls.TControl.Visible"/>
|
|
<element name="TListBox.OnChangeBounds" link="#lcl.controls.TControl.OnChangeBounds"/>
|
|
<element name="TListBox.OnClick" link="#lcl.controls.TControl.OnClick"/>
|
|
<element name="TListBox.OnContextPopup" link="#lcl.controls.TControl.OnContextPopup"/>
|
|
<element name="TListBox.OnDblClick" link="#lcl.controls.TControl.OnDblClick"/>
|
|
<element name="TListBox.OnDragDrop" link="#lcl.controls.TControl.OnDragDrop"/>
|
|
<element name="TListBox.OnDragOver" link="#lcl.controls.TControl.OnDragOver"/>
|
|
<element name="TListBox.OnDrawItem" link="#lcl.stdctrls.TCustomListBox.OnDrawItem"/>
|
|
<element name="TListBox.OnEnter" link="#lcl.controls.TWinControl.OnEnter"/>
|
|
<element name="TListBox.OnEndDrag" link="#lcl.controls.TControl.OnEndDrag"/>
|
|
<element name="TListBox.OnExit" link="#lcl.controls.TWinControl.OnExit"/>
|
|
<element name="TListBox.OnKeyPress" link="#lcl.controls.TWinControl.OnKeyPress"/>
|
|
<element name="TListBox.OnKeyDown" link="#lcl.controls.TWinControl.OnKeyDown"/>
|
|
<element name="TListBox.OnKeyUp" link="#lcl.controls.TWinControl.OnKeyUp"/>
|
|
<element name="TListBox.OnMeasureItem" link="#lcl.stdctrls.TCustomListBox.OnMeasureItem"/>
|
|
<element name="TListBox.OnMouseMove" link="#lcl.controls.TControl.OnMouseMove"/>
|
|
<element name="TListBox.OnMouseDown" link="#lcl.controls.TControl.OnMouseDown"/>
|
|
<element name="TListBox.OnMouseUp" link="#lcl.controls.TControl.OnMouseUp"/>
|
|
<element name="TListBox.OnMouseEnter" link="#lcl.controls.TControl.OnMouseEnter"/>
|
|
<element name="TListBox.OnMouseLeave" link="#lcl.controls.TControl.OnMouseLeave"/>
|
|
<element name="TListBox.OnMouseWheel" link="#lcl.controls.TControl.OnMouseWheel"/>
|
|
<element name="TListBox.OnMouseWheelDown" link="#lcl.controls.TControl.OnMouseWheelDown"/>
|
|
<element name="TListBox.OnMouseWheelUp" link="#lcl.controls.TControl.OnMouseWheelUp"/>
|
|
<element name="TListBox.OnMouseWheelHorz" link="#lcl.controls.TControl.OnMouseWheelHorz"/>
|
|
<element name="TListBox.OnMouseWheelLeft" link="#lcl.controls.TControl.OnMouseWheelLeft"/>
|
|
<element name="TListBox.OnMouseWheelRight" link="#lcl.controls.TControl.OnMouseWheelRight"/>
|
|
<element name="TListBox.OnResize" link="#lcl.controls.TControl.OnResize"/>
|
|
<element name="TListBox.OnSelectionChange" link="#lcl.stdctrls.TCustomListBox.OnSelectionChange"/>
|
|
<element name="TListBox.OnShowHint" link="#lcl.controls.TControl.OnShowHint"/>
|
|
<element name="TListBox.OnStartDrag" link="#lcl.controls.TControl.OnStartDrag"/>
|
|
<element name="TListBox.OnUTF8KeyPress" link="#lcl.controls.TWinControl.OnUTF8KeyPress"/>
|
|
<element name="TListBox.Options" link="#lcl.stdctrls.TCustomListBox.Options"/>
|
|
|
|
<element name="TCustomEdit">
|
|
<short>The base class for controls presenting editable text.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TCustomEdit</var> is a <var>TWinControl</var> descendant which
|
|
implements the base class for an edit control presenting a single line of
|
|
text. TCustomEdit provides properties, methods, and events needed for common
|
|
editing features in the control, including:
|
|
</p>
|
|
<ul>
|
|
<li>Text</li>
|
|
<li>TextHint</li>
|
|
<li>Modified</li>
|
|
<li>ReadOnly</li>
|
|
<li>MaxLength</li>
|
|
<li>Clear</li>
|
|
<li>NumbersOnly</li>
|
|
<li>CharCase</li>
|
|
<li>EchoMode</li>
|
|
<li>PasswordChar</li>
|
|
<li>AutoSelect</li>
|
|
<li>SelectAll</li>
|
|
<li>SelStart</li>
|
|
<li>SelLength</li>
|
|
<li>SelText</li>
|
|
<li>HideSelection</li>
|
|
<li>ClearSelection</li>
|
|
<li>CaretPos</li>
|
|
<li>CopyToClipboard</li>
|
|
<li>CutToClipboard</li>
|
|
<li>PasteFromClipboard</li>
|
|
<li>Undo</li>
|
|
</ul>
|
|
<p>
|
|
Do not create instances of TCustomEdit in an application; use one of the
|
|
descendent classes like <var>TEdit</var>, <var>TLabeledEdit</var>,
|
|
<var>TMaskEdit</var>, or <var>TMemo</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TEdit"/>
|
|
<link id="TMemo"/>
|
|
<link id="#lcl.extctrls.TLabeledEdit">TLabeledEdit</link>
|
|
<link id="#lcl.maskedit.TMaskEdit">TMaskEdit</link>
|
|
<link id="#lcl.controls.TWinControl">TWinControl</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.FAlignment" link="#lcl.stdctrls.TCustomEdit.Alignment"/>
|
|
<element name="TCustomEdit.FAutoSelect" link="#lcl.stdctrls.TCustomEdit.AutoSelect"/>
|
|
<element name="TCustomEdit.FAutoSelected" link="#lcl.stdctrls.TCustomEdit.AutoSelected"/>
|
|
<element name="TCustomEdit.FCharCase" link="#lcl.stdctrls.TCustomEdit.CharCase"/>
|
|
<element name="TCustomEdit.fCaretPos" link="#lcl.stdctrls.TCustomEdit.CaretPos"/>
|
|
<element name="TCustomEdit.FEchoMode" link="#lcl.stdctrls.TCustomEdit.EchoMode"/>
|
|
|
|
<element name="TCustomEdit.FEmulatedTextHintStatus">
|
|
<short>Status for the emulated TextHint for the control.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.FHideSelection" link="#lcl.stdctrls.TCustomEdit.HideSelection"/>
|
|
<element name="TCustomEdit.FMaxLength" link="#lcl.stdctrls.TCustomEdit.MaxLength"/>
|
|
<element name="TCustomEdit.FModified" link="#lcl.stdctrls.TCustomEdit.Modified"/>
|
|
<element name="TCustomEdit.FOnChangeHandler" link="#lcl.stdctrls.TCustomEdit.AddHandlerOnChange"/>
|
|
<element name="TCustomEdit.FPasswordChar" link="#lcl.stdctrls.TCustomEdit.PasswordChar"/>
|
|
<element name="TCustomEdit.FReadOnly" link="#lcl.stdctrls.TCustomEdit.ReadOnly"/>
|
|
<element name="TCustomEdit.FNumbersOnly" link="#lcl.stdctrls.TCustomEdit.NumbersOnly"/>
|
|
<element name="TCustomEdit.FOnChange" link="#lcl.stdctrls.TCustomEdit.OnChange"/>
|
|
<element name="TCustomEdit.FSelLength" link="#lcl.stdctrls.TCustomEdit.SelLength"/>
|
|
<element name="TCustomEdit.FSelStart" link="#lcl.stdctrls.TCustomEdit.SelStart"/>
|
|
<element name="TCustomEdit.FTextChangedByRealSetText" link="#lcl.stdctrls.TCustomEdit.RealSetText"/>
|
|
<element name="TCustomEdit.FTextChangedLock" link="#lcl.stdctrls.TCustomEdit.TextChanged"/>
|
|
<element name="TCustomEdit.FTextHint" link="#lcl.stdctrls.TCustomEdit.TextHint"/>
|
|
|
|
<element name="TCustomEdit.ShowEmulatedTextHintIfYouCan">
|
|
<short>Displays an emulated text hint when possible.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.ShowEmulatedTextHint">
|
|
<short>Displays a TextHint using the hint font for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ShowEmulatedTextHint</var> is a method used to display an emulated Text
|
|
hint using the hint font for the control. Emulated text hints are used for
|
|
widgetsets that do not natively support the <var>TextHint</var> capability.
|
|
</p>
|
|
<p>
|
|
ShowEmulatedTextHint gets the Hint font for the display by calling
|
|
<var>CreateEmulatedTextHintFont</var>, and passes the value to the widgetset
|
|
class. The value in <var>Text</var> is set to the text in the TextHint
|
|
property. The widgetset class is notified of the property changes, and an
|
|
internal flag used to track emulated hint display is set to <b>True</b>.
|
|
</p>
|
|
<p>
|
|
The compliment to ShowEmulatedTextHint is <var>HideEmulatedTextHint</var>.
|
|
</p>
|
|
<p>
|
|
ShowEmulatedTextHint is used in the implementation of the private
|
|
<var>ShowEmulatedTextHintIfYouCan</var> method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.TextHint"/>
|
|
<link id="TCustomEdit.HideEmulatedTextHint"/>
|
|
<link id="TCustomEdit.Text"/>
|
|
<link id="CreateEmulatedTextHintFont"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.HideEmulatedTextHint">
|
|
<short>
|
|
Hides an emulated TextHint display, and restores the Font and PasswordChar in
|
|
the control.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SetAlignment">
|
|
<short>Sets the value for the Alignment property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.Alignment"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.SetAlignment.AValue">
|
|
<short>New value for the Alignment property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.GetCanUndo">
|
|
<short>Gets the value for the CanUndo property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.CanUndo"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.GetCanUndo.Result">
|
|
<short>Value for the CanUndo property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.GetModified">
|
|
<short>Gets the value for the Modified property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.Modified"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.GetModified.Result">
|
|
<short>Value for the Modified property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SetHideSelection">
|
|
<short>Sets the value for the HideSelection property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.HideSelection"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.SetHideSelection.AValue">
|
|
<short>New value for the HideSelection property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SetMaxLength">
|
|
<short>Sets the value for the MaxLength property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.MaxLength"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.SetMaxLength.Value">
|
|
<short>New value for the MaxLength property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SetModified">
|
|
<short>Sets the value for the Modified property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.Modified"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.SetModified.Value">
|
|
<short>New value for the Modified property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SetPasswordChar">
|
|
<short>Sets the value for the PasswordChar property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.PasswordChar"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.SetPasswordChar.AValue">
|
|
<short>New value for the PasswordChar property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
|
|
|
|
<element name="TCustomEdit.CanShowEmulatedTextHint">
|
|
<short>
|
|
Indicates if the value in TextHint can be displayed in the edit control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>CanShowEmulatedTextHint</var> is a <var>Boolean</var> function which
|
|
indicates if the value in TextHint can be emulated for the edit control. The
|
|
return value is <b>True</b> when the following conditions are met:
|
|
</p>
|
|
<ul>
|
|
<li>A handle has been allocated for the control.</li>
|
|
<li>
|
|
The widgetset class does <b>NOT</b> include the lcTextHint LCL capability
|
|
flag (the lack of native widgetset support for the feature is why it's being
|
|
emulated).
|
|
</li>
|
|
<li>
|
|
ComponentState indicates that the component is not being loaded using LCL
|
|
streaming, and is not being edited at design-time.
|
|
</li>
|
|
<li>TextHint is <b>not</b> an empty string ('').</li>
|
|
<li>Text <b>is</b> an empty string ('').</li>
|
|
<li>The control is not Focused.</li>
|
|
</ul>
|
|
<p>
|
|
CanShowEmulatedTextHint is used in the <var>WMKillFocus</var> method, and
|
|
when the values in <var>Text</var> or <var>TextHint</var> are applied for the
|
|
control.
|
|
</p>
|
|
<remark>
|
|
In the current LCL implementation, TextHint display is emulated for all
|
|
widgetsets except Win32/Win64 (since ComCtIVersionIE6) and QT5.
|
|
</remark>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.Text"/>
|
|
<link id="TCustomEdit.TextHint"/>
|
|
<link id="#lcl.controls.TWinControl.Focused">TWinControl.Focused</link>
|
|
<link id="#rtl.classes.TComponent.ComponentState">TComponent.ComponentState</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.CanShowEmulatedTextHint.Result">
|
|
<short><b>True</b> when the emulated text hint can be displayed.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.CalculatePreferredSize">
|
|
<short>Gets the preferred size for a new instance of the class.</short>
|
|
<descr>
|
|
<p>
|
|
<var>CalculatePreferredSize</var> is overridden in <var>TCustomEdit</var>,
|
|
and calls the inherited method on entry. CalculatePreferredSize sets the
|
|
value in the <var>PreferredWidth</var> parameter to <b>0</b> (<b>zero</b>).
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.CalculatePreferredSize">TWinControl.CalculatePreferredSize</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.CalculatePreferredSize.PreferredWidth">
|
|
<short>Preferred width calculated for the control.</short>
|
|
</element>
|
|
<element name="TCustomEdit.CalculatePreferredSize.PreferredHeight">
|
|
<short>Preferred height calculated for the control.</short>
|
|
</element>
|
|
<element name="TCustomEdit.CalculatePreferredSize.WithThemeSpace">
|
|
<short><b>True</b> when space is reserved for theme element details.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.CreateParams">
|
|
<short>
|
|
Ensures the required creation parameters are set for handle creation.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>CreateParams</var> is an overridden method used to ensure that the
|
|
creation parameters for the control are updated to reflect property values in
|
|
the control instance. CreateParams is called when the handle for the control
|
|
is create (or re-created).
|
|
</p>
|
|
<p>
|
|
CreateParams calls the inherited method on entry, and updates the Style flags
|
|
in <var>Params</var> to include values required for the control. The
|
|
following edit style flags are included in the method:
|
|
</p>
|
|
<dl>
|
|
<dt>ES_AUTOHSCROLL</dt>
|
|
<dd>Always included in TCustomEdit.</dd>
|
|
<dt>ES_LEFT</dt>
|
|
<dd>Included when Alignment contains taLeftJustify.</dd>
|
|
<dt>ES_RIGHT</dt>
|
|
<dd>Included when Alignment contains taRightJustify.</dd>
|
|
<dt>ES_CENTER</dt>
|
|
<dd>Included when Alignment contains taCenter.</dd>
|
|
<dt>ES_READONLY</dt>
|
|
<dd>Included when ReadOnly is set to <b>True</b>.</dd>
|
|
<dt>ES_NUMBER</dt>
|
|
<dd>Included when NumbersOnly is set to <b>True</b>.</dd>
|
|
<dt>ES_NOHIDESEL</dt>
|
|
<dd>Included when HideSelection is set to <b>False</b>.</dd>
|
|
</dl>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.CreateParams">TWinControl.CreateParams</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.CreateParams.Params">
|
|
<short>Creation parameters updated in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.InitializeWnd">
|
|
<short>Initializes the window handle for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>InitializeWnd</var> is an overridden method used to ensure that property
|
|
values from the class instance are stored in the widgetset class when the
|
|
handle for the control is created (or re-created). InitializeWnd calls the
|
|
inherited method on entry.
|
|
</p>
|
|
<p>
|
|
Values in the following properties are posted using methods in the widgetset
|
|
class:
|
|
</p>
|
|
<ul>
|
|
<li>CharCase</li>
|
|
<li>EchoMode</li>
|
|
<li>MaxLength</li>
|
|
<li>PasswordChar</li>
|
|
<li>ReadOnly</li>
|
|
<li>Alignment</li>
|
|
<li>CaretPos</li>
|
|
<li>SelStart</li>
|
|
<li>SelLength</li>
|
|
<li>TextHint</li>
|
|
</ul>
|
|
<p>
|
|
The ShowEmulatedTextHintIfYouCan method is called when inline hints are
|
|
emulated for the widgetset.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.InitializeWnd">TWinControl.InitializeWnd</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.TextChanged">
|
|
<short>
|
|
Applies case conversion (if needed), and updates the editing cursor selection
|
|
text.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TextChanged</var> is a an overridden method used to perform actions
|
|
needed when the <b>CM_TEXTCHANGED</b> message is handled for the control. No
|
|
actions are performed in the method when a previous call to TextChanged has
|
|
not been completed.
|
|
</p>
|
|
<p>
|
|
TextChanged uses the value in <var>CharCase</var> to determine if case
|
|
conversion is applied to the value in Text. When CharCase contains
|
|
<var>ecUpperCase</var> or <var>ecLowerCase</var>, the corresponding UTF-8
|
|
conversion routine is called. When Text is modified in the method, the values
|
|
in <var>CaretPos</var>, <var>SelStart</var>, and <var>SelLength</var> are
|
|
re-applied to the control. At run-time, the value in <var>Modified</var> is
|
|
set to <b>True</b> when Text has been changed in the method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.CharCase"/>
|
|
<link id="TCustomEdit.Text"/>
|
|
<link id="TCustomEdit.CaretPos"/>
|
|
<link id="TCustomEdit.SelStart"/>
|
|
<link id="TCustomEdit.SelLength"/>
|
|
<link id="TCustomEdit.Modified"/>
|
|
<link id="TCustomEdit.RealSetText"/>
|
|
<link id="#lazutils.lazutf8.UTF8UpperCase">UTF8UpperCase</link>
|
|
<link id="#lazutils.lazutf8.UTF8LowerCase">UTF8LowerCase</link>
|
|
<link id="#lcl.controls.TControl.TextChanged">TControl.TextChanged</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.FontChanged">
|
|
<short>Handles changes to the font used in the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>FontChanged</var> is an overridden method in <var>TCustomEdit</var>. It
|
|
ensures that the <var>Font</var> used for an emulated <var>TextHint</var>
|
|
display is (re-)created when visible by calling
|
|
<var>CreateEmulatedTextHintFont</var>.
|
|
</p>
|
|
<p>
|
|
FontChanged calls the inherited method to set flags in the control, and to
|
|
perform notifications of the changed value to any child controls. The hint
|
|
font is freed when the inherited method is completed.
|
|
</p>
|
|
<p>
|
|
FontChanged is assigned as the <var>OnChange</var> event handler for the
|
|
<var>TFont</var> class instance in the Font property.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.TextHint"/>
|
|
<link id="#lcl.controls.TWinControl.FontChanged">TWinControl.FontChanged</link>
|
|
<link id="#lcl.controls.TControl.Font">TControl.Font</link>
|
|
<link id="CreateEmulatedTextHintFont"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.FontChanged.Sender">
|
|
<short>Object for the event notification.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.Change">
|
|
<short>
|
|
Performs actions needed when the text in the control is changed.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Change</var> is a procedure used to perform actions need when the
|
|
<b>CM_CHANGED</b> message is handled in the control. Change calls the
|
|
inherited <var>Changed</var> method, and signals the <var>OnChange</var>
|
|
and/or the internal FOnChangeHandler event handlers (when assigned).
|
|
</p>
|
|
<p>
|
|
Change is called from the <var>TextChanged</var> method after case conversion
|
|
and updates to the editing cursor and text selection.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.OnChange"/>
|
|
<link id="TCustomEdit.TextChanged"/>
|
|
<link id="#lcl.controls.TControl.Changed">TControl.Changed</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.DoEnter" >
|
|
<short>
|
|
Signals the OnEnter event handler, and selects the entire text when
|
|
AutoSelect is <b>True</b>.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
This special handling is required when the control is entered using
|
|
keystrokes (keyboard navigation), and not by a mouse click.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.DoEnter">TWinControl.DoEnter</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.DoExit">
|
|
<short>Clears the value in AutoSelected when the control loses focus.</short>
|
|
<descr>
|
|
<p>
|
|
<var>DoExit</var> is an overridden method in <var>TCustomEdit</var>. It
|
|
ensures that the AutoSelected property is set to <b>False</b> prior to
|
|
signalling the OnExit event handler (when assigned) in the ancestor class.
|
|
DoExit is called when the <b>CM_EXIT</b> control message is handled in the
|
|
ancestor class.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.DoExit">TWinControl.DoExit</link>
|
|
<link id="#lcl.controls.TWinControl.OnExit">TWinControl.OnExit</link>
|
|
<link id="#lcl.controls.TWinControl.CMExit">TWinControl.CMExit</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.EditingDone">
|
|
<short>
|
|
Enforces the setting in the ReadOnly property when editing is finished in the
|
|
control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>EditingDone</var> is an overridden method in <var>TCustomEdit</var>. It
|
|
ensures that the inherited method is <b>NOT</b> called when the value in
|
|
<var>ReadOnly</var> is <b>True</b>. EditingDone is called from the
|
|
<var>KeyUpAfterInterface</var> method when the <var>VK_RETURN</var> key code
|
|
is handled.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.EditingDone">TControl.EditingDone</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.GetCaretPos">
|
|
<short>Gets the value for the CaretPos property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.CaretPos"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.GetCaretPos.Result">
|
|
<short>Value for the CaretPos property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.GetNumbersOnly">
|
|
<short>Gets the value for the NumbersOnly property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.NumbersOnly"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.GetNumbersOnly.Result">
|
|
<short>Value for the NumbersOnly property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.GetReadOnly">
|
|
<short>Gets the value for the ReadOnly property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.ReadOnly"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.GetReadOnly.Result">
|
|
<short>Value for the ReadOnly property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.GetSelLength">
|
|
<short>Gets the value for the SelLength property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.SelLength"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.GetSelLength.Result">
|
|
<short>The number of selected UTF-8 characters in the control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.GetSelStart">
|
|
<short>Gets the value for the SelStart property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.SelStart"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.GetSelStart.Result">
|
|
<short>Value for the SelStart property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.GetSelText">
|
|
<short>Gets the value for the SelText property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.SelText"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.GetSelText.Result">
|
|
<short>Value for the SelText property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.GetTextHint">
|
|
<short>Gets the value for the TextHint property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.TextHint"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.GetTextHint.Result">
|
|
<short>Value for the TextHint property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SetCaretPos">
|
|
<short>Sets the value for the CaretPos property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.CaretPos"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.SetCaretPos.Value">
|
|
<short>New value for the CaretPos property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SetCharCase">
|
|
<short>Sets the value for the CharCase property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.CharCase"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.SetCharCase.Value">
|
|
<short>New value for the CharCase property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SetEchoMode">
|
|
<short>Sets the value for the EchoMode property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.EchoMode"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.SetEchoMode.Val">
|
|
<short>New value for the EchoMode property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SetNumbersOnly">
|
|
<short>Sets the value for the NumbersOnly property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.NumbersOnly"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.SetNumbersOnly.Value">
|
|
<short>New value for the NumbersOnly property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SetReadOnly">
|
|
<short>Sets the value for the ReadOnly property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.ReadOnly"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.SetReadOnly.Value">
|
|
<short>New value for the ReadOnly property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SetSelLength">
|
|
<short>Sets the value for the SelLength property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.SelLength"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.SetSelLength.Val">
|
|
<short>New value for the SelLength property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SetSelStart">
|
|
<short>Sets the value for the SelStart property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.SelStart"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.SetSelStart.Val">
|
|
<short>New value for the SelStart property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SetSelText">
|
|
<short>Sets the value for the SelText property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.SelText"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.SetSelText.Val">
|
|
<short>New value for the SelText property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SetTextHint">
|
|
<short>Sets the value for the TextHint property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.TextHint"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.SetTextHint.AValue">
|
|
<short>New value for the TextHint property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.ChildClassAllowed">
|
|
<short>
|
|
Indicates whether child controls using the specified class are allowed.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>ChildClassAllowed</var> is overridden in <var>TCustomEdit</var> to use
|
|
the widgetset class to determine whether child controls can be embedded
|
|
within the control. The return value is <b>True</b> when the
|
|
<var>GetLCLCapability</var> method in the widgetset class returns
|
|
<var>LCL_CAPABILITY_YES</var> for the lcAllowChildControlsInNativeControls
|
|
query.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.ChildClassAllowed">TWinControl.ChildClassAllowed</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.ChildClassAllowed.Result">
|
|
<short>
|
|
<b>True</b> if a child control using the specified class type are allowed for
|
|
the control.
|
|
</short>
|
|
</element>
|
|
<element name="TCustomEdit.ChildClassAllowed.ChildClass">
|
|
<short>Class type for the child control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.GetControlClassDefaultSize" link="#lcl.controls.TControl.GetControlClassDefaultSize"/>
|
|
|
|
<element name="TCustomEdit.MouseUp">
|
|
<short>Handles mouse up events for the control.</short>
|
|
<descr>
|
|
<p>
|
|
Selects all of the Text in the control when a left mouse button event occurs
|
|
in the focused control and AutoSelect is set to <b>True</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.MouseUp">TControl.MouseUp</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.MouseUp.Button">
|
|
<short>Mouse button examined in the method.</short>
|
|
</element>
|
|
<element name="TCustomEdit.MouseUp.Shift">
|
|
<short>Shift / Ctrl / Alt modifier for the mouse event.</short>
|
|
</element>
|
|
<element name="TCustomEdit.MouseUp.X">
|
|
<short>Horizontal screen coordinate for the mouse event.</short>
|
|
</element>
|
|
<element name="TCustomEdit.MouseUp.Y">
|
|
<short>Vertical screen coordinate for the mouse event.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.RealGetText">
|
|
<short>
|
|
Uses the TextHint display status when getting the value for Text.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>RealGetText</var> is an overridden method in <var>TCustomEdit</var>. It
|
|
ensures that an emulated <var>TextHint</var> display status is considered
|
|
when getting the value for the <var>Text</var> property. In other words, the
|
|
inherited method is <b>not</b> called when the TextHint display is visible.
|
|
The return value is an empty string (<b>''</b>) in this case.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.Text"/>
|
|
<link id="TCustomEdit.TextHint"/>
|
|
<link id="#lcl.controls.TControl.RealGetText">TControl.RealGetText</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.RealGetText.Result">
|
|
<short>Value used for the Text property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.RealSetText">
|
|
<short>
|
|
Updates Modified and the TextHint display when storing the new Text value.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>RealSetText</var> is an overridden method in <var>TCustomEdit</var>. It
|
|
ensures that the value in <var>Modified</var> is updated when a new value in
|
|
<var>Text</var> is applied to the <var>Caption</var> for the control. It also
|
|
hides the <var>TextHint</var> display when the new value is not an empty
|
|
string (<b>''</b>) by calling <var>HideEmulatedTextHint</var>.
|
|
</p>
|
|
<p>
|
|
RealSetText calls the inherited method to store the Text value, and to adjust
|
|
the control size when needed.
|
|
</p>
|
|
<p>
|
|
The TextHint is re-displayed when it is hidden and
|
|
<var>CanShowEmulatedTextHint</var> returns <b>True</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.CanShowEmulatedTextHint"/>
|
|
<link id="TCustomEdit.Modified"/>
|
|
<link id="TCustomEdit.Text"/>
|
|
<link id="TCustomEdit.TextHint"/>
|
|
<link id="#lcl.controls.TWinControl.RealSetText">TWinControl.RealSetText</link>
|
|
<link id="#lcl.controls.TControl.Caption">TControl.Caption</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.RealSetText.AValue">
|
|
<short>New value stored as the text/caption for the control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.KeyUpAfterInterface">
|
|
<short>Handles Key Up events forwarded from the LCL interface.</short>
|
|
<descr>
|
|
<p>
|
|
<var>KeyUpAfterInterface</var> handles the <var>VK_RETURN</var> key code for
|
|
the control. It calls <var>EditingDone</var> to signal the
|
|
<var>OnEditingDone</var> event handler (when assigned). When
|
|
<var>AutoSelect</var> is set to <b>True</b>, the <var>SelectAll</var> method
|
|
is called to select all of the <var>Text</var> in the control.
|
|
<var>AutoSelected</var> is updated to reflect the action.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.KeyUpAfterInterface">TWinControl.KeyUpAfterInterface</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.KeyUpAfterInterface.Key">
|
|
<short>Virtual key code examined in the method.</short>
|
|
</element>
|
|
<element name="TCustomEdit.KeyUpAfterInterface.Shift">
|
|
<short>Shift, Ctrl, or Alt modifier for the key code.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.WMChar">
|
|
<short>Handles a WM_CHAR window message for the control.</short>
|
|
<descr>
|
|
<p>
|
|
Prevents keystrokes for normal characters from acting as accelerator keys.
|
|
When the Shift state in Message contains ssCtrl or ssAlt, the inherited
|
|
method is called to handle the WM_CHAR message.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.WMChar">TWinControl.WMChar</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.WMChar.Message">
|
|
<short>Window message examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.CMWantSpecialKey">
|
|
<short>Handles the CM_WANTSPECIALKEY message for the control.</short>
|
|
<descr>
|
|
<p>
|
|
For the Darwin platform/widgetset, the LCL must be prevented from handling
|
|
the arrow (cursor) keys VK_LEFT, VK_RIGHT, VK_UP, and VK_DOWN. The Result in
|
|
Message is set to 1 to indicate that these keys have already been handled.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomEdit.CMWantSpecialKey.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.WndProc">
|
|
<short>
|
|
Suppresses the CM_CHANGED control message when an emulated TextHint is
|
|
visible.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>WndProc</var> is an overridden method in <var>TCustomEdit</var>. It
|
|
ensures that the <b>CM_CHANGED</b> message is suppressed when an emulated
|
|
<var>TextHint</var> is visible for the control. Otherwise, the inherited
|
|
method is called to dispatch the control <var>Message</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.WndProc">TWinControl.WndProc</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.WndProc.Message">
|
|
<short>Message examined and handled for the control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.ShouldAutoAdjust">
|
|
<short>
|
|
Determines if the control should auto-adjust its Height and/or Width.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>ShouldAutoAdjust</var> is an overridden method in <var>TCustomEdit</var>
|
|
used to determine if the control can auto-adjust its Height and/or Width.
|
|
</p>
|
|
<p>
|
|
<var>AWidth</var> and <var>AHeight</var> are variable Boolean parameters
|
|
which indicate if the corresponding property can be auto-sized. AWidth is
|
|
always set to <b>True</b> for TCustomEdit. AHeight is set to the inverse of
|
|
the value in <var>AutoSize</var>.
|
|
</p>
|
|
<p>
|
|
ShouldAutoAdjust does <b>NOT</b> call the inherited method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.ShouldAutoAdjust">TControl.ShouldAutoAdjust</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.ShouldAutoAdjust.AWidth">
|
|
<short><b>True</b> when Width can be auto-adjusted.</short>
|
|
</element>
|
|
<element name="TCustomEdit.ShouldAutoAdjust.AHeight">
|
|
<short><b>True</b> when Height can be auto-adjusted.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.WMSetFocus">
|
|
<short>Handles the LM_SETFOCUS message for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>WMSetFocus</var> is an overridden method in <var>TCustomEdit</var>. It
|
|
is used to hide a visible emulated <var>TextHint</var> display when the
|
|
control is focused. Calls <var>HideEmulatedTextHint</var> to remove the
|
|
TextHint display. Calls the inherited method prior to exit.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.WMSetFocus">TWinControl.WMSetFocus</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.WMSetFocus.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.WMKillFocus">
|
|
<short>Handles the LM_KILLFOCUS message for the control.</short>
|
|
<descr>
|
|
<p>
|
|
Calls the inherited WMKillFocus method on entry to perform the EditingDone
|
|
method when the parent form is Active. Ensures that an emulated TextHint is
|
|
displayed when needed and allowed.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.CanShowEmulatedTextHint"/>
|
|
<link id="TCustomEdit.TextHint"/>
|
|
<link id="TCustomEdit.EditingDone"/>
|
|
<link id="#lcl.controls.TWinControl.WMKillFocus">TWinControl.WMKillFocus</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.WMKillFocus.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.AutoSelect">
|
|
<short>Enables auto-selection of text when focused.</short>
|
|
<descr>
|
|
<p>
|
|
<var>AutoSelect</var> is a <var>Boolean</var> property which enables or
|
|
disables auto-selection of text when the control receives focus. If
|
|
<b>True</b>, the edit control will select all its text when it receives focus
|
|
or when the Enter key is pressed. The default value for the property is
|
|
<b>True</b>.
|
|
</p>
|
|
<p>
|
|
AutoSelect is used in the KeyUpAfterInterface method, and determines if the
|
|
SelectAll method is called when editing is completed in the control. It is
|
|
used in MouseUp to determine if SelectAll is called when the Left mouse
|
|
button is clicked. It is also used in DoEnter to determine if SelectAll is
|
|
called when the Enter key is pressed.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.SelectAll"/>
|
|
<link id="TCustomEdit.AutoSelected"/>
|
|
<link id="TCustomEdit.KeyUpAfterInterface"/>
|
|
<link id="TCustomEdit.MouseUp"/>
|
|
<link id="TCustomEdit.DoEnter"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.AutoSelected">
|
|
<short>
|
|
Set to <b>True</b> when the text selection was made automatically.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>AutoSelected</var> is a <var>Boolean</var> property which indicates if
|
|
the text selection in the control was made automatically after handling key
|
|
press or mouse events.
|
|
</p>
|
|
<p>
|
|
AutoSelected is used in conjunction with the <var>AutoSelect</var> property
|
|
which enables the capability. AutoSelected is not set to <b>True</b> when
|
|
AutoSelect has not been enabled. AutoSelect is enabled by default in
|
|
<var>TCustomEdit</var>.
|
|
</p>
|
|
<p>
|
|
AutoSelected is updated when the <b>Enter</b> (<b>^M</b>) key is handled for
|
|
the control, or when a left mouse up event is handled for an already focused
|
|
control. When AutoSelect is set to <b>True</b>, the <var>SelectAll</var>
|
|
method is called to select all of the the text in the control. AutoSelected
|
|
is set to <b>True</b> when <var>SelText</var> has the same value as the
|
|
<var>Text</var> property.
|
|
</p>
|
|
<p>
|
|
AutoSelected is set to <b>False</b> when focus leaves the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.AutoSelect"/>
|
|
<link id="TCustomEdit.SelectAll"/>
|
|
<link id="TCustomEdit.SelText"/>
|
|
<link id="TCustomEdit.KeyUpAfterInterface"/>
|
|
<link id="TCustomEdit.MouseUp"/>
|
|
<link id="TCustomEdit.DoEnter"/>
|
|
<link id="TCustomEdit.DoExit"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.ParentColor">
|
|
<short>Uses the Color from the Parent control, when enabled.</short>
|
|
<descr>
|
|
<p>
|
|
ParentColor determines if the control should use the Color from the Parent
|
|
control, when enabled. The default value is <b>False</b> in TCustomEdit.
|
|
</p>
|
|
<p>
|
|
When this property is <b>True</b>, all changes to the Color of the parent
|
|
will also be applied to the Color of the control, ensuring that they both
|
|
contain same value. If the Color of the control is changed by the
|
|
application, then ParentColor will be automatically set to <b>False</b>.
|
|
</p>
|
|
<p>
|
|
Using ParentColor when the Color value is clDefault can cause problems in
|
|
resolving the actual color value. To obtain the Color property of a control
|
|
while taking into account clDefault and ParentColor, use the
|
|
GetColorResolvingParent method. This method might return a non-RGB color, but
|
|
will never return clDefault. To obtain a purely RGB result use the
|
|
GetRGBColorResolvingParent method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.ParentColor">TControl.ParentColor</link>
|
|
<link id="#lcl.controls.TControl.Color">TControl.Color</link>
|
|
<link id="#lcl.controls.TControl.GetColorResolvingParent">TControl.GetColorResolvingParent</link>
|
|
<link id="#lcl.controls.TControl.GetRGBColorResolvingParent">TControl.GetRGBColorResolvingParent</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.Create">
|
|
<short>Constructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Create</var> is the overridden constructor for the class instance, and
|
|
calls the inherited constructor on entry. Create ensures that values in the
|
|
component and <var>ControlStyle</var> properties are set for the control.
|
|
ControlStyle excludes the value csCaptureMouse and includes the value
|
|
csRequiresKeyboardInput.
|
|
</p>
|
|
<p>
|
|
Create sets the default values for properties, including: <var>MaxLength,
|
|
HideSelection, ParentColor, TabStop, EchoMode, BorderStyle, AutoSelect,
|
|
AutoSelected,</var> and <var>TextHint</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
</seealso></element>
|
|
<element name="TCustomEdit.Create.AOwner">
|
|
<short>Owner of the class instance.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.Destroy">
|
|
<short>Destructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Destroy</var> is the overridden destructor for the class instance.
|
|
Destroy ensures that resources allocated for the internal change handler are
|
|
freed, and calls the inherited destructor prior to exit.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.Clear">
|
|
<short>Deletes all text in the edit box for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Clear</var> is a procedure used to remove the text in the control. Clear
|
|
sets the value in <var>Text</var> to an empty string (<b>''</b>).
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.Text"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SelectAll">
|
|
<short>Selects the entire text in the edit control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>SelectAll</var> is a procedure used to select all of the text content in
|
|
the edit box for the control.
|
|
</p>
|
|
<p>
|
|
SelectAll checks the value in <var>Text</var> to ensure that content is
|
|
available for the selection. No actions are performed in the method when Text
|
|
is an empty string (<b>''</b>).
|
|
</p>
|
|
<p>
|
|
When Text is not empty, the values in <var>SelStart</var> and
|
|
<var>SelLength</var> are updated to use the content in Text starting at the
|
|
first UTF-8-encoded character. UTF8Length is called to get the length for
|
|
Text, and the value stored in SelLength.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.Text"/>
|
|
<link id="TCustomEdit.SelStart"/>
|
|
<link id="TCustomEdit.SelLength"/>
|
|
<link id="TCustomEdit.SelText"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.ClearSelection">
|
|
<short>Clears the current text selection in the edit control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ClearSelection</var> is a procedure used to clear the currently selected
|
|
text in the edit control. ClearSelection sets the value in <var>SelText</var>
|
|
to an empty string ('') to discard selected value in the edit control. It
|
|
does <b>not</b> affect the values in the <var>Text</var> property.
|
|
</p>
|
|
<p>
|
|
No actions are performed in the method when <var>SelLength</var> contains
|
|
<b>0</b> (<b>zero</b>).
|
|
</p>
|
|
<p>
|
|
Use <var>HideSelection</var> to disable text selection in the edit control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id='TCustomEdit.SelText'/>
|
|
<link id='TCustomEdit.SelStart'/>
|
|
<link id='TCustomEdit.SelLength'/>
|
|
<link id='TCustomEdit.HideSelection'/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.CopyToClipboard">
|
|
<short>Copies the selected text in the control to the clipboard.</short>
|
|
<descr>
|
|
<p>
|
|
<var>CopyToClipboard</var> is a procedure used to copy the selected text in
|
|
the control to the clipboard. CopyToClipboard is performed for selected text
|
|
when the <b>Ctrl+C</b> or <b>Ctrl+Insert</b> key combination is handled for
|
|
the edit control. <b>Meta+C</b> or <b>Meta+Insert</b> is used for macOS. No
|
|
actions are performed when text is not selected in the control.
|
|
</p>
|
|
<p>
|
|
CopyToClipboard calls the <var>Copy</var> method in the widgetset class when
|
|
a handle has been allocated for the control.
|
|
</p>
|
|
<p>
|
|
Use <var>CutToClipboard</var> to copy the selected text to the clipboard, and
|
|
delete it from the text in the edit control.
|
|
</p>
|
|
<p>
|
|
Use <var>PasteFromClipboard</var> to insert the contents of the clipboard
|
|
into the text for the edit control.
|
|
</p>
|
|
<p>
|
|
Use <var>Undo</var> to revert the last editing action performed in the
|
|
control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.CutToClipboard"/>
|
|
<link id="TCustomEdit.PasteFromClipboard"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.CutToClipboard">
|
|
<short>
|
|
Moves the selected text into the clipboard (removes it from the control).
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>CutToClipboard</var> is a method used to move the current text selection
|
|
in the control to the clipboard. The selected value is removed from the Text
|
|
in the control.
|
|
</p>
|
|
<p>
|
|
CutToClipboard is performed when the <b>Ctrl+X</b> or <b>Shift+Delete</b> key
|
|
combination is handled in the control (macOS uses <b>Meta+X</b> or
|
|
<b>Shift+Delete</b>). Pressing <b>Shift+Delete</b> when text is not selected
|
|
(<var>SelLength</var> is 0) causes the the character prior to the editing
|
|
cursor to be deleted but not copied to the clipboard. No actions are
|
|
performed if the editing cursor is positioned before the first character in
|
|
the Text for the control.
|
|
</p>
|
|
<p>
|
|
CutToClipboard calls the <var>Cut</var> method in the widgetset class when
|
|
its handle has been allocated.
|
|
</p>
|
|
<p>
|
|
Use <var>CopyToClipboard</var> to copy the current text selection in the
|
|
control to the clipboard.
|
|
</p>
|
|
<p>
|
|
Use <var>PasteFromClipboard</var> to insert the contents of the clipboard at
|
|
the current position in the edit control.
|
|
</p>
|
|
<p>
|
|
Use <var>Undo</var> to revert the last editing action performed in the
|
|
control.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.PasteFromClipboard">
|
|
<short>
|
|
Inserts text from the clipboard at the current position in the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>PasteFromClipboard</var> is a method used to insert the contents of the
|
|
clipboard at the current position in the edit control. If Text is selected in
|
|
the control, the SelText is replaced with the clipboard content. When
|
|
SelLength is 0, the clipboard values are inserted at the position for the
|
|
editing cursor.
|
|
</p>
|
|
<p>
|
|
PasteFromClipboard is performed when the <b>Ctrl+V</b> or <b>Shift+Insert</b>
|
|
key combination is handled for the control (macOS uses <b>Meta+V</b> or
|
|
<b>Shift+Insert</b>).
|
|
</p>
|
|
<p>
|
|
PasteFromClipboard calls the <var>Paste</var> method in the widgetset class
|
|
when its handle has been allocated.
|
|
</p>
|
|
<p>
|
|
Use <var>CopyToClipboard</var> to copy the current text selection in the
|
|
control to the clipboard.
|
|
</p>
|
|
<p>
|
|
Use <var>CutToClipboard</var> to copy the selected text to the clipboard, and
|
|
delete it from the text in the edit control.
|
|
</p>
|
|
<p>
|
|
Use <var>Undo</var> to revert the last editing action performed in the
|
|
control.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.Undo">
|
|
<short>Reverts the last editing action in the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Undo</var> is a method used to revert the last editing action performed
|
|
in the control. Undo is performed when the <b>Ctrl+Z</b> (or <b>Meta+Z</b> on
|
|
macOS) key combination is handled for the control. Pressing <b>Ctrl+Z</b>
|
|
causes the value in Text to revert to its value before editing. A subsequent
|
|
<b>Ctrl+Z</b> key press causes the edited value to be toggled.
|
|
</p>
|
|
<p>
|
|
Undo calls the <var>Undo</var> method in the widgetset class when its handle
|
|
has been allocated.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.RemoveAllHandlersOfObject">
|
|
<short>Removes all event handlers assigned for the specified object.</short>
|
|
<descr>
|
|
<p>
|
|
<var>RemoveAllHandlersOfObject</var> is an overridden method in TCustomEdit,
|
|
and calls the inherited method on entry to remove handlers for the specified
|
|
object.
|
|
</p>
|
|
<p>
|
|
RemoveAllHandlersOfObject uses the internal <var>TMethodList</var> instance
|
|
(when assigned) and calls its RemoveAllMethodsOfObject method to remove
|
|
entries where the <var>TMethod</var> data points to the object specified in
|
|
AnObject.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.RemoveAllHandlersOfObject">TControl.RemoveAllHandlersOfObject</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.RemoveAllHandlersOfObject.AnObject">
|
|
<short>
|
|
Object instance to remove for the list of handlers in the control.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.AddHandlerOnChange">
|
|
<short>Adds the specified OnChange event handler to the control.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomEdit.AddHandlerOnChange.AnOnChangeEvent">
|
|
<short>Event handler added in the method.</short>
|
|
</element>
|
|
<element name="TCustomEdit.AddHandlerOnChange.AsFirst">
|
|
<short>
|
|
<b>True</b> if the handler is stored at the top of the method list for the
|
|
handler type.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.RemoveHandlerOnChange">
|
|
<short>
|
|
Removes the specified OnChange event handler for the list of handlers in the
|
|
control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>RemoveHandlerOnChange</var> is a method used to remove the event handler
|
|
specified in <var>AnOnChangeEvent</var> from the list of <var>OnChange</var>
|
|
handlers for the control. AnOnChangeEvent is a <var>TNotifyEvent</var>
|
|
instance, and it is used to locate and remove the <var>TMethod</var> entry
|
|
registered for the handler. RemoveHandlerOnChange reverses the actions
|
|
performed in <var>AddHandlerOnChange</var>, called when an OnChange event
|
|
handler is assigned to the control.
|
|
</p>
|
|
<p>
|
|
No actions are performed in the method when the internal OnChange method list
|
|
has not been assigned (contains <b>Nil</b>).
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lazutils.lazmethodlist.TMethodList">TMethodList</link>
|
|
<link id="#lazutils.lazmethodlist.TMethodList.Remove">TMethodList.Remove</link>
|
|
<link id="#rtl.system.TMethod">TMethod</link>
|
|
<link id="#rtl.classes.TNotifyEvent">TNotifyEvent</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomEdit.RemoveHandlerOnChange.AnOnChangeEvent">
|
|
<short>Event handler removed from the list of handlers in the control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.Alignment">
|
|
<short>
|
|
The horizontal alignment for the text in the control (left, right, or
|
|
centered).
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Alignment</var> is a <var>TAlignment</var> property which controls the
|
|
horizontal alignment of text in the control. The default value for the
|
|
property is taLeftJustify. See <link
|
|
id="#rtl.classes.TAlignment">TAlignment</link> for more information about the
|
|
enumeration values and their meanings.
|
|
</p>
|
|
<p>
|
|
Alignment is used in <var>CreateParams</var> when alignment style flags are
|
|
added to the creation parameters for the method. The value is also passed to
|
|
the widgetset class then the handle is created (or re-created) for the class
|
|
instance. Changing the value in the property causes the widgetset class to be
|
|
notified when a handle has been allocated for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.AutoSize">
|
|
<short>
|
|
Allows automatic adjustment of the size for the control, according to its
|
|
content.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
The action performed depends on the control type. For example, a label or
|
|
button can become bigger or smaller to accommodate a longer or shorter
|
|
caption. The default value for the property is <b>True</b> in TCustomEdit.
|
|
and enables auto-sizing the control instance to its content.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.AutoSize">TControl.AutoSize</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.BorderStyle">
|
|
<short>Indicates the line style drawn as a border around the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>BorderStyle</var> is a <var>TBorderStyle</var> property with the line
|
|
style used for borders on the control. The default value for the property is
|
|
bsSingle in TCustomEdit, and causes the control to be drawn with the client
|
|
edges style enabled. Use bsNone if borders are not needed for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.BorderStyle">TWinControl.BorderStyle</link>
|
|
<link id="#lcl.controls.TBorderStyle">TBorderStyle</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.CanUndo">
|
|
<short>
|
|
Indicates whether the last change can be reverted in the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>CanUndo</var> is a read-only <var>Boolean</var> property which indicates
|
|
whether the last editing change can be reverted in the control using the Undo
|
|
method.
|
|
</p>
|
|
<p>
|
|
The property value is <b>False</b> if a handle has not been allocated for the
|
|
widgetset class. Otherwise, the property value is determined by calling the
|
|
<var>GetCanUndo</var> method in the widgetset class.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.CaretPos">
|
|
<short>The position of the editing cursor in the control.</short>
|
|
<descr>
|
|
<p>
|
|
CaretPos is a TPoint property which contains the coordinates for the caret
|
|
(or editing cursor) in the control. The coordinates reflects logical (UTF-8)
|
|
characters and lines.
|
|
</p>
|
|
<dl>
|
|
<dt>TPoint.X</dt>
|
|
<dd>
|
|
Contains the zero-based offset into the UTF-8-encoded characters in the
|
|
control Text. Position 0 is immediately prior to the first UTF-8 character in
|
|
Text. If there is selected text in the control, the caret is considered to be
|
|
positioned right <b>after</b> the last selected character. Character
|
|
positions are independent of the LTR/RTL BiDi-ness for the control.
|
|
</dd>
|
|
<dt>TPoint.Y</dt>
|
|
<dd>
|
|
Contains the zero-based relative line number for the editing cursor. For
|
|
single-line edits the value is normally 0.
|
|
</dd>
|
|
</dl>
|
|
<p>
|
|
The value in CaretPos is updated by the widgetset class when key and
|
|
selection control messages are handled.
|
|
</p>
|
|
</descr>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.CharCase">
|
|
<short>
|
|
Controls the character case applied to values entered in the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
CharCase is a TEditCharCase property which indicates how values in Text are
|
|
converted and displayed in the control.
|
|
</p>
|
|
<dl>
|
|
<dt>ecNormal</dt>
|
|
<dd>
|
|
Normal letter case is applied; no conversion is applied. Use the Shift key to
|
|
change the case for a character entered in the control.
|
|
</dd>
|
|
<dt>ecUpperCase</dt>
|
|
<dd>
|
|
Values in Text are converted to uppercase letters. Shift key state is ignored.
|
|
</dd>
|
|
<dt>ecLowerCase</dt>
|
|
<dd>
|
|
Values in Text are converted to lowercase letters. Shift key state is ignored.
|
|
</dd>
|
|
</dl>
|
|
<p>
|
|
The default value for the property is ecNormal. Changing the value for the
|
|
property causes the existing values in Text to be converted to the case
|
|
indicated in the new property value.
|
|
</p>
|
|
<remark>
|
|
Conversions apply to the entire value in Text, and <b>cannot</b> be reverted.
|
|
</remark>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.Text">TControl.Text</link>
|
|
<link id="#lcl.stdctrls.TEditCharCase">TEditCharCase</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.EchoMode">
|
|
<short>
|
|
Allows to modify the text display, useful for entering passwords.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
The following conversions can be specified:
|
|
</p>
|
|
<dl>
|
|
<dt>emNormal</dt>
|
|
<dd>No changes are performed.</dd>
|
|
<dt>emNone</dt>
|
|
<dd>Spaces are echoed instead for the control value.</dd>
|
|
<dt>emPassword</dt>
|
|
<dd>The value in PasswordChar is echoed.</dd>
|
|
</dl>
|
|
<remark>Conversions apply to the entire text, and <b>cannot</b> be
|
|
reverted.</remark>
|
|
</descr>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.EmulatedTextHintStatus">
|
|
<short>Status for the emulated TextHint in the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>EmulatedTextHintStatus</var> is a read-only
|
|
<var>TEmulatedTextHintStatus</var> property which contains the status value
|
|
for an emulated TextHint display in the control. EmulatedTextHintStatus is
|
|
used when a value has been assigned to the <var>TextHint</var> property and
|
|
the widgetset does not natively implement the capability. The LCL emulates
|
|
the TextHint display by assigning the value in TextHint to the
|
|
<var>Text</var> for the control.
|
|
</p>
|
|
<p>
|
|
EmulatedTextHintStatus is updated in the <var>ShowEmulatedTextHint</var> and
|
|
<var>HideEmulatedTextHint</var> methods.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TEmulatedTextHintStatus"/>
|
|
<link id="TCustomEdit.TextHint"/>
|
|
<link id="TCustomEdit.Text"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.HideSelection">
|
|
<short>
|
|
Determines if selected text to be hidden when the control does not have focus.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>HideSelection</var> is a <var>Boolean</var> property which determines
|
|
whether the selected text in the control is hidden when the control does not
|
|
have focus.
|
|
</p>
|
|
<p>
|
|
HideSelection negates the default behavior in the edit control. The default
|
|
behavior hides the selection when the control loses focus, and displays the
|
|
text selection when the control receives focus. When set to <b>False</b>, the
|
|
selected text (if any) is <b>always</b> displayed in the selected state -
|
|
even when the control loses focus.
|
|
</p>
|
|
<p>
|
|
The default value for the property is <b>True</b>.
|
|
</p>
|
|
<p>
|
|
Changing the value for the property causes the <var>SetHideSelection</var>
|
|
method in the widgetset class to be called when its handle has been
|
|
allocated. No actions are performed in the method when the handle has not
|
|
been allocated for the widgetset class.
|
|
</p>
|
|
<p>
|
|
The value in HideSelection is used in the <var>CreateParams</var> method to
|
|
determine whether the <var>ES_NOHIDESEL</var> edit style flag is included in
|
|
or omitted from the creation parameters for the control. When HideSelection
|
|
is set to <b>False</b>, the ES_NOHIDESEL edit style is included in the flag
|
|
values.
|
|
</p>
|
|
<p>
|
|
Use SelText, SelStart, and SelLength to change the text selection in program
|
|
code. Use ClearSelection to remove the current text selection in the edit
|
|
control.
|
|
</p>
|
|
<remark>
|
|
HideSelection is not supported for the GTK2, QT4, QT5, and QT6 widgetsets.
|
|
</remark>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.Text"/>
|
|
<link id="TCustomEdit.SelText"/>
|
|
<link id="TCustomEdit.SelStart"/>
|
|
<link id="TCustomEdit.SelLength"/>
|
|
<link id="TCustomEdit.ClearSelection"/>
|
|
<link id="TCustomEdit.CreateParams"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.MaxLength">
|
|
<short>
|
|
The maximum length of the value entered in Text, or 0 (zero) for unlimited
|
|
length.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
In Delphi MaxLength only limits user input. The LCL actually restricts the
|
|
maximum length of the stored text; this simplifies the implementation for
|
|
non-Win32 widgetsets.
|
|
</p>
|
|
<remark>
|
|
MaxLength is not supported for the QT4 widgetset.
|
|
</remark>
|
|
</descr>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.Modified">
|
|
<short>
|
|
<b>True</b> when the value in Text has been changed using the keyboard.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Modified</var> is a <var>Boolean</var> property which indicates if the
|
|
value in <var>Text</var> has been changed when a <b>CM_TEXTCHANGED</b>
|
|
message is handled for the control. The value is set to <b>True</b> in the
|
|
<var>TextChanged</var> method. The value is reset to <b>False</b> when
|
|
<var>RealSetText</var> is called to store the value in Text to the buffer for
|
|
the control.
|
|
</p>
|
|
<p>
|
|
In short, Modified is set to <var>True</var> if the value in Text is changed
|
|
by user interaction with the control (keyboard or clipboard). It is set to
|
|
<var>False</var> if the value in Text was assigned in program code.
|
|
</p>
|
|
<p>
|
|
Use event handlers, like OnEditingDone or OnChange, to perform actions needed
|
|
when the value for the control has been changed.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.Text"/>
|
|
<link id="TCustomEdit.TextChanged"/>
|
|
<link id="TCustomEdit.RealSetText"/>
|
|
<link id="TCustomEdit.OnChange"/>
|
|
<link id="#lcl.controls.TControl.OnEditingDone">TControl.OnEditingDone</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.NumbersOnly">
|
|
<short>
|
|
Indicates if the edit control accepts numeric values only.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>NumbersOnly</var> is a <var>Boolean</var> property which controls
|
|
whether Text is limited to characters which represent numeric digits. The
|
|
default value for the property is <b>False</b>, and allows any character
|
|
valid for the type to be entered. When set to <b>True</b>, only the
|
|
characters '0'..'9' are accepted in Text. '+', '-', ',', and '.' are
|
|
<b>not</b> numeric digits.
|
|
</p>
|
|
<p>
|
|
Changing the property value causes the widgetset class to be notified when a
|
|
handle has been allocated for the control.
|
|
</p>
|
|
<p>
|
|
NumbersOnly is used in <var>CreateParams</var> to include the
|
|
<b>ES_NUMBER</b> edit style in the creation parameters for the control when
|
|
set to <b>True</b>.
|
|
</p>
|
|
<p>
|
|
NumbersOnly is not supported on all platform for the LCL; GTK 2 does not
|
|
support the property.
|
|
</p>
|
|
<p>
|
|
Versions of Windows prior to Windows 95 did not enforce the ES_NUMBER style
|
|
flag. It could be specified, but still allowed any value to be manually
|
|
entered into the edit control. Some version of Windows allowed copy (Ctrl+C)
|
|
and paste (Ctrl+V) to be used to insert non-numeric values - even when
|
|
NumbersOnly is set to <b>True</b>.
|
|
</p>
|
|
<p>
|
|
For inputs that require both numeric and punctuation digits, use one of the
|
|
keyboard event handlers like OnKeyPress or OnKeyDown to filter values as they
|
|
are entered into a control. Or, use TMaskEdit which supports using an edit
|
|
mask for the input values.
|
|
</p>
|
|
<remark>
|
|
NumbersOnly is not supported for the GTK2 or GTK3 widgetset.
|
|
</remark>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.Text"/>
|
|
<link id="TCustomEdit.CreateParams"/>
|
|
<link id="#lcl.controls.TWinControl.OnKeyPress">TWinControl.OnKeyPress</link>
|
|
<link id="#lcl.controls.TWinControl.OnKeyDown">TWinControl.OnKeyDown</link>
|
|
<link id="#lcl.maskedit.TMaskEdit">TMaskEdit</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.OnChange">
|
|
<short>
|
|
Event handler signalled when the text for the control is changed.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>OnChange</var> is a <var>TNotifyEvent</var> property with the event
|
|
handler signalled when the text for the control is changed.
|
|
</p>
|
|
<p>
|
|
OnChange is triggered when the value in <var>Text</var> is modified either by
|
|
using the keyboard or assigning a new value in program code. Please note that
|
|
this differs from controls, like <var>TCustomComboBox</var> /
|
|
<var>TComboBox</var>, where the event is not signalled when the control value
|
|
is changed in program code.
|
|
</p>
|
|
<p>
|
|
When the control value is edited using the keyboard, OnChange is signalled
|
|
after each character or keystroke is handled and applied to the value in
|
|
Text. To avoid visible delays during editing, the event handler should not be
|
|
too time or resource intensive.
|
|
</p>
|
|
<p>
|
|
Use the Modified property to determine whether the change is the result of
|
|
user interaction with the control, or setting the control value in program
|
|
code. Modified contains <b>False</b> if the value was assigned in program code.
|
|
</p>
|
|
<p>
|
|
OnChange is signalled (when assigned) from the <var>Change</var> method, and
|
|
occurs after the <var>Changed</var> method is used to post the
|
|
<var>CM_CHANGED</var> control message.
|
|
</p>
|
|
<p>
|
|
Use the OnEditingDone event handler to perform actions needed when editing has
|
|
been completed in the control. For example: when the Enter key is pressed or
|
|
the focus is changed to another control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.Change"/>
|
|
<link id="TCustomEdit.Text"/>
|
|
<link id="TCustomEdit.Modified"/>
|
|
<link id="#lcl.controls.TControl.Changed">TControl.Changed</link>
|
|
<link id="#lcl.controls.TControl.OnEditingDone">TControl.OnEditingDone</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.PasswordChar">
|
|
<short>
|
|
Allows obfuscation of the displayed text, showing all characters as
|
|
PasswordChar.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
Typically used in password input, to hide the input from other viewers. The
|
|
value in <var>Text</var> is still available for the <b>WM_GETTEXT</b> message.
|
|
</p>
|
|
<remark>
|
|
For the macOS Carbon widgetset, changing the default value for the property is not supported.
|
|
</remark>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.EchoMode"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.PopupMenu" link="#lcl.controls.TControl.PopupMenu"/>
|
|
|
|
<element name="TCustomEdit.ReadOnly">
|
|
<short>
|
|
Indicates if the user is prevented from changing the value for the Text in
|
|
the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>ReadOnly</var> is a <var>Boolean</var> property which indicates if the
|
|
user is prevented from changing the value in the control.
|
|
</p>
|
|
<p>
|
|
ReadOnly is used in the <var>CreateParams</var> method to determine if the
|
|
<b>ES_READONLY</b> edit style flag is included in the creation parameters for
|
|
the control. The value is also passed to the widgetset class in the
|
|
<var>InitializeWnd</var> method, and when the value for the property is
|
|
changed.
|
|
</p>
|
|
<p>
|
|
When ReadOnly is <b>True</b>, the <var>EditingDone</var> method does not
|
|
signal the <var>OnEditingDone</var> event handler (in the ancestor).
|
|
</p>
|
|
<p>
|
|
The default value for the property is <b>False</b>, and indicates that the
|
|
value can be edited in the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.CreateParams"/>
|
|
<link id="TCustomEdit.InitializeWnd"/>
|
|
<link id="TCustomEdit.EditingDone"/>
|
|
<link id="#lcl.controls.TControl.EditingDone">TControl.EditingDone</link>
|
|
<link id="#lcl.controls.TControl.OnEditingDone">TControl.OnEditingDone</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SelLength">
|
|
<short>
|
|
The number of currently selected UTF-8-encoded characters in the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>SelLength</var> is an <var>Integer</var> property which contains the
|
|
number of UTF-8-encoded characters currently selected in the edit box for the
|
|
control. The current selection is the value in <var>Text</var> starting at
|
|
the ordinal position in <var>SelStart</var> and continuing for the number of
|
|
characters in the property.
|
|
</p>
|
|
<p>
|
|
The value for the property is read from the widgetset class when a handle has
|
|
been allocated for the control. Otherwise, the internal member is read get
|
|
the value for the property. Setting a new value for the property notifies the
|
|
widgetset class when a handle has been allocated for the control.
|
|
</p>
|
|
<p>
|
|
Use <var>SelStart</var> to set the zero-based position in Text for the first
|
|
UTF-8-encoded character in the current text selection.
|
|
</p>
|
|
<p>
|
|
Use <var>SelText</var> to examine the values selected in the control, or to
|
|
replace the value in the current text selection. <var>ClearSelection</var>
|
|
can be used to remove the characters in the current text selection for the
|
|
control.
|
|
</p>
|
|
<p>
|
|
Use <var>SelectAll</var> to make all values in Text the current text
|
|
selection in the control.
|
|
</p>
|
|
<p>
|
|
Use <var>HideSelection</var> to un-select the current text selection in the
|
|
control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.SelText"/>
|
|
<link id="TCustomEdit.SelStart"/>
|
|
<link id="TCustomEdit.SelectAll"/>
|
|
<link id="TCustomEdit.HideSelection"/>
|
|
<link id="TCustomEdit.ClearSelection"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SelStart">
|
|
<short>
|
|
The zero-based index for the first UTF-8 character in the current text
|
|
selection.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>SelStart</var> is an <var>Integer</var> property which contains the
|
|
ordinal position in <var>Text</var> for the UTF-8-encoded character at the
|
|
start of the current text selection. The current text selection includes the
|
|
number of characters in <var>SelLength</var>. SelStart is a zero-based value.
|
|
</p>
|
|
<p>
|
|
The value for SelStart is read from the widgetset class when a handle has
|
|
been allocated for the control. Otherwise, the value is read from the
|
|
internal member for the property. Setting a new value for the property
|
|
notifies the widgetset class when a handle has been allocated for the control.
|
|
</p>
|
|
<p>
|
|
Use <var>SelLength</var> for the number of UTF-8-encoded characters in the
|
|
current text selection.
|
|
</p>
|
|
<p>
|
|
Use <var>SelText</var> to examine the values selected in the control, or to
|
|
replace the value in the current text selection. <var>ClearSelection</var>
|
|
can be used to remove the characters in the current text selection for the
|
|
control.
|
|
</p>
|
|
<p>
|
|
Use <var>SelectAll</var> to make all values in Text the current text
|
|
selection in the control.
|
|
</p>
|
|
<p>
|
|
Use <var>HideSelection</var> to un-select the current text selection in the
|
|
control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.SelLength"/>
|
|
<link id="TCustomComboBox.SelStart"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.SelText">
|
|
<short>The currently selected text in the edit box for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>SelText</var> is a <var>String</var> property which contains the current
|
|
text selection in the control. The current text selection is the
|
|
UTF-8-encoded characters in <var>Text</var> identified by the
|
|
<var>SelStart</var> and <var>SelLength</var> properties.
|
|
</p>
|
|
<p>
|
|
The property value is derived by calling the <var>UTF8Copy</var> routine in
|
|
<file>lazutf8.pas</file>. Setting a new value for the property causes the
|
|
text selection in Text to be replaced with the specified value. The widgetset
|
|
class is notified when a handle has been allocated for the control.
|
|
</p>
|
|
<p>
|
|
Values must assigned to the SelStart and SelLength property before accessing
|
|
SelText.
|
|
</p>
|
|
<p>
|
|
SelText is updated when the <var>ClearSelection</var> is called to remove the
|
|
text selection value from the content in Text. SelText is compared to Text to
|
|
determine the value for <var>AutoSelected</var> when <b>VK_RETURN</b> key or
|
|
<b>MouseUp</b> messages are handled.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.SelLength"/>
|
|
<link id="TCustomEdit.SelStart"/>
|
|
<link id="TCustomEdit.Text"/>
|
|
<link id="TCustomEdit.AutoSelected"/>
|
|
<link id="TCustomEdit.ClearSelection"/>
|
|
<link id="#lazutils.lazutf8.UTF8Copy">UTF8Copy</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.TabOrder" link="#lcl.controls.TWinControl.TabOrder"/>
|
|
|
|
<element name="TCustomEdit.TabStop">
|
|
<short>Enables keyboard navigation using the Tab or Shift+Tab keys.</short>
|
|
<descr>
|
|
<p>
|
|
Allows the user to navigate to this control by pressing the Tab or Shift+Tab
|
|
keys. The default value for the property is <b>True</b> in
|
|
<var>TCustomEdit</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.TabStop">TWinControl.TabStop</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.Text">
|
|
<short>The text displayed and edited for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Text</var> is a <var>TCaption</var> property which contains the
|
|
UTF-8-encoded characters maintained as the value for the edit control. The
|
|
property value can be assigned at design-time using the Object Inspector in
|
|
the Lazarus IDE, or at run-time in program code. For example:
|
|
</p>
|
|
<code>
|
|
Edit1.Text := 'Volts DC';
|
|
ShowMessage('Unit Measure = ' + Edit1.Text);
|
|
</code>
|
|
<p>
|
|
The value in Text is read and written using the <var>RealGetText</var> and
|
|
<var>RealSetText</var> methods. Not only do they provide code compatibility
|
|
with the Delphi VCL, they support use of emulated <var>TextHint</var>
|
|
displays. The value in TextHint is temporarily assigned to Text when an
|
|
inline hint is displayed for the control.
|
|
</p>
|
|
<p>
|
|
The value in Text may be altered in the <var>TextChanged</var> method when
|
|
the setting in <var>CharCase</var> requires case conversion for the value in
|
|
the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.TextChanged"/>
|
|
<link id="TCustomEdit.CharCase"/>
|
|
<link id="TCustomEdit.TextHint"/>
|
|
<link id="TCustomEdit.RealGetText"/>
|
|
<link id="TCustomEdit.RealSetText"/>
|
|
<link id="#lcl.controls.TControl.Text">TControl.Text</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomEdit.TextHint">
|
|
<short>
|
|
Default hint text shown when the Text property is empty for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TextHint</var> is a <var>TTranslateString</var> property which contains
|
|
the inline hint text displayed for the control. It is displayed in the
|
|
editable area for the <var>TCustomEdit</var> when the Text property is empty.
|
|
Some platforms may refer to this feature as a "placeholder" or "editing hint".
|
|
The value in TextHint is normally displayed using the color in clGrayText.
|
|
</p>
|
|
<p>
|
|
The display behavior for TextHint is platform-specific. On some platforms, the
|
|
text hint is displayed any time the value in Text is empty. For others, it is
|
|
displayed only when the control does not have focus.
|
|
</p>
|
|
<p>
|
|
Setting a new value in TextHint causes the widgetset class to be notified,
|
|
and the value is displayed in the edit control when allowed. If the new
|
|
property value is an empty string (''), the text hint is removed from the
|
|
control.
|
|
</p>
|
|
<p>
|
|
For platforms that do not provide native support for TextHint, an emulated
|
|
text hint is displayed. This is a TCustomEdit control created to enable the
|
|
feature, and can be displayed only when the original control does not have
|
|
focus.
|
|
</p>
|
|
<p>
|
|
TextHint is different than Hint, which displays a balloon tip when ShowHint is
|
|
set to <b>True</b> and the mouse is over the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.Text"/>
|
|
<link id="TCustomEdit.CanShowEmulatedTextHint"/>
|
|
<link id="#lcl.controls.TControl.Hint">TControl.Hint</link>
|
|
<link id="#lcl.controls.TControl.ShowHint">TControl.ShowHint</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TMemoScrollbar">
|
|
<short>A scrollbar for use in Memo controls.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TMemoScrollbar</var> is a scrollbar specifically for use with
|
|
<var>TMemo</var> controls. It provides overridden GetHorzScrollBar and
|
|
GetVertScrollBar methods used to access the individual scrollbars in the
|
|
associated TCustomMemo/TMemo control. TMemoScrollbar inherits its properties
|
|
from its ancestor, <link
|
|
id="#lcl.forms.TControlScrollBar">TControlScrollBar</link>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomMemo"/>
|
|
<link id="TMemo"/>
|
|
<link id="#lcl.forms.TControlScrollBar">TControlScrollBar</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TMemoScrollbar.GetHorzScrollBar">
|
|
<short>Gets the HorzScrollBar in the associated memo control.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomMemo.HorzScrollBar"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TMemoScrollbar.GetHorzScrollBar.Result">
|
|
<short>Value for the HorzScrollBar property in the memo control.</short>
|
|
</element>
|
|
|
|
<element name="TMemoScrollbar.GetVertScrollBar">
|
|
<short>Gets the VertScrollBar in the associated memo control.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomMemo.VertScrollBar"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TMemoScrollbar.GetVertScrollBar.Result">
|
|
<short>Value for the VertScrollBar property in the memo control.</short>
|
|
</element>
|
|
|
|
<element name="TMemoScrollbar.Increment" link="#lcl.forms.TControlScrollBar.Increment"/>
|
|
<element name="TMemoScrollbar.Page" link="#lcl.forms.TControlScrollBar.Page"/>
|
|
<element name="TMemoScrollbar.Smooth" link="#lcl.forms.TControlScrollBar.Smooth"/>
|
|
<element name="TMemoScrollbar.Position" link="#lcl.forms.TControlScrollBar.Position"/>
|
|
<element name="TMemoScrollbar.Range" link="#lcl.forms.TControlScrollBar.Range"/>
|
|
<element name="TMemoScrollbar.Size" link="#lcl.forms.TControlScrollBar.Size"/>
|
|
<element name="TMemoScrollbar.Visible" link="#lcl.forms.TControlScrollBar.Visible"/>
|
|
|
|
<element name="TCustomMemo">
|
|
<short>The base class for multi-line text controls.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TCustomMemo</var> is a <var>TCustomEdit</var> descendant which
|
|
implements the base class used for a multi-line edit control. TCustomMemo
|
|
extends TCustomEdit with additional properties and methods needed for the
|
|
control. Overridden methods are provided to create and initialize the control
|
|
using style flags needed for the widgetset class.
|
|
</p>
|
|
<p>
|
|
The textual values in the multi-line control can be accessed using the
|
|
<var>Lines</var> property. An individual line of text can be accessed by its
|
|
ordinal position in the list of values. For example:
|
|
</p>
|
|
<code>
|
|
// var sContent: String;
|
|
sContent := AMemo.Lines[2];
|
|
</code>
|
|
<p>
|
|
This provides access to the third value in List (index positions are
|
|
zero-based).
|
|
</p>
|
|
<p>
|
|
The values for all of the text in Lines can be retrieved as a single String
|
|
using the <var>Text</var> property in the <var>TStrings</var> class instance.
|
|
Each line of text is separated by the <var>LineEnding</var> character
|
|
sequence for the host platform or operating system. For example:
|
|
</p>
|
|
<code>
|
|
// var sContent: String; ...
|
|
sContent := AMemo.Lines.Text;
|
|
</code>
|
|
<p>
|
|
Please note: There is a difference in TCustomMemo / TMemo between the
|
|
<var>Text</var> and <var>Lines</var> properties. Text is actually the Caption
|
|
for the control as inherited from TControl. Lines is the multi-line TStrings
|
|
instance specific to the memo control. Setting the control value using Text
|
|
does <b>NOT</b> cause the <var>Modified</var> property to be updated. Setting
|
|
the value using the Lines property does cause the Modified property to be
|
|
updated.
|
|
</p>
|
|
<p>
|
|
This is important if an <var>OnChange</var> event handler is used to detect
|
|
changes to the value in the control, and you need to identify whether the
|
|
change was performed in program code. You can identify a programmatic change
|
|
by manipulating the value in Modified.
|
|
</p>
|
|
<p>
|
|
For changes in program code, set Modified to <b>False</b> before setting the
|
|
value using the Text property. If Modified is <b>False</b> when OnChange is
|
|
signalled, the change occurred in program code. Modified can be set as
|
|
desired in your program code after the value is assigned to Text. For example:
|
|
</p>
|
|
<code>
|
|
// use Modified and Text to track program changes
|
|
procedure TForm1.Button1Click(Sender: TObject);
|
|
begin
|
|
Memo1.Modified := False;
|
|
Memo1.Text := 'Whiskey' + LineEnding + 'Tango' + LineEnding + 'Foxtrot';
|
|
Memo1.Modified := True;
|
|
end;
|
|
|
|
procedure TForm1.Memo1Change(Sender: TObject);
|
|
begin
|
|
if not TCustomMemo(Sender).Modified then
|
|
StaticText1.Caption := 'Memo changed in code'
|
|
else
|
|
StaticText1.Caption := 'Memo changed by user';
|
|
end;
|
|
</code>
|
|
<p>
|
|
Changes entered by the user are applied when methods update the Lines
|
|
property in the control. As a result, Modified is set to <b>True</b>. If
|
|
Modified is <b>True</b> in OnChange, the change was triggered by user
|
|
interaction with the control.
|
|
</p>
|
|
<p>
|
|
The value in Modified is retained when the control gains or loses focus
|
|
whether by keyboard navigation or by using the mouse.
|
|
</p>
|
|
<p>
|
|
The text displayed in the control uses the attributes defined in the
|
|
<var>Font</var> property. No capabilities are provided for formatting
|
|
individual characters, words, or lines in the content for the control.
|
|
</p>
|
|
<p>
|
|
Both horizontal and vertical scrollbars can be used in the control. Use the
|
|
<var>ScrollBar</var> property to define the scrollbars displayed for the
|
|
control. It can be used to enable automatic scrollbars which are only
|
|
displayed when the content for the control does not fit within its bounds.
|
|
</p>
|
|
<p>
|
|
Use the <var>Append</var> method to add a line of text to the values in Lines.
|
|
</p>
|
|
<p>
|
|
Use the <var>WantTabs</var> and <var>WantReturns</var> properties to
|
|
determine whether the corresponding keys are captured and stored in Lines.
|
|
This affects the way control messages are applied to the control.
|
|
</p>
|
|
<p>
|
|
Use <var>WordWrap</var> to indicate if the control should automatically wrap
|
|
a line of text longer than the visible area for the control.
|
|
</p>
|
|
<p>
|
|
Applications should not create instances of TCustomMemo; use <var>TMemo</var>
|
|
instead.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomMemo.ScrollBars"/>
|
|
<link id="TCustomMemo.HorzScrollBar"/>
|
|
<link id="TCustomMemo.VertScrollBar"/>
|
|
<link id="TCustomMemo.Lines"/>
|
|
<link id="TCustomMemo.WordWrap"/>
|
|
<link id="TCustomMemo.WantTabs"/>
|
|
<link id="TCustomMemo.WantReturns"/>
|
|
<link id="TCustomEdit.Modified"/>
|
|
<link id="TCustomEdit.Text"/>
|
|
<link id="TCustomEdit.OnChange"/>
|
|
<link id="TCustomEdit"/>
|
|
<link id="TMemo"/>
|
|
<link id="#lcl.controls.TControl.Font">TControl.Font</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.FHorzScrollBar" link="#lcl.stdctrls.TCustomMemo.HorzScrollBar"/>
|
|
<element name="TCustomMemo.FLines" link="#lcl.stdctrls.TCustomMemo.Lines"/>
|
|
<element name="TCustomMemo.FScrollBars" link="#lcl.stdctrls.TCustomMemo.ScrollBars"/>
|
|
<element name="TCustomMemo.FVertScrollBar" link="#lcl.stdctrls.TCustomMemo.VertScrollBar"/>
|
|
<element name="TCustomMemo.FWantReturns" link="#lcl.stdctrls.TCustomMemo.WantReturns"/>
|
|
<element name="TCustomMemo.FWantTabs" link="#lcl.stdctrls.TCustomMemo.WantTabs"/>
|
|
<element name="TCustomMemo.FWordWrap" link="#lcl.stdctrls.TCustomMemo.WordWrap"/>
|
|
|
|
<element name="TCustomMemo.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
|
|
|
|
<element name="TCustomMemo.CreateParams">
|
|
<short>
|
|
Updates creation flags used to create the handle for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>CreateParams</var> is overridden in <var>TCustomMemo</var>, and calls
|
|
the inherited method on entry. CreateParams ensures that style flags needed
|
|
for the multi-line control are included in the <var>Style</var> property in
|
|
the <var>Params</var> argument.
|
|
</p>
|
|
<p>
|
|
Values from the <var>ScrollBars</var> and <var>WordWrap</var> properties are
|
|
checked, and flags are added as needed. ScrollBars causes window style flags
|
|
to be added like WS_HSCROLL and/or WS_VSCROLL. When <var>WordWrap</var> is
|
|
set to <b>True</b>, the WS_HSCROLL window style is removed from the creation
|
|
parameters. Otherwise, the edit style ES_AUTOHSCROLL is added to the creation
|
|
parameters.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.CreateParams"/>
|
|
<link id="TCustomMemo.ScrollBars"/>
|
|
<link id="TCustomMemo.WordWrap"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.CreateParams.Params">
|
|
<short>Creation parameters for the control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.InitializeWnd">
|
|
<short>Copies existing string values from the widgetset class.</short>
|
|
<descr>
|
|
<p>
|
|
<var>InitializeWnd</var> is an overridden method in <var>TCustomMemo</var>.
|
|
InitializeWnd ensures that property values from widgetset class are stored in
|
|
the current class instance when handle for the control is created (or
|
|
re-created). InitializeWnd is called after the handle for the control was
|
|
created, but before the the handle for child controls is created.
|
|
</p>
|
|
<p>
|
|
InitializeWnd ensures that string values in the widgetset class (if any) are
|
|
copied to a new <var>TStrings</var> instance and assigned to the
|
|
<var>Lines</var> property. The previous TStrings instance in Lines is freed.
|
|
</p>
|
|
<p>
|
|
InitializeWnd calls the inherited method prior to exit.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomMemo.Lines"/>
|
|
<link id="TCustomEdit.InitializeWnd"/>
|
|
<link id="#rtl.classes.TStrings">TStrings</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.FinalizeWnd">
|
|
<short>Frees resources when the handle for the control is freed.</short>
|
|
<descr>
|
|
<p>
|
|
<var>FinalizeWnd</var> ensures that string values in <var>Lines</var> are
|
|
freed in the widgetset class before the handle is destroyed for the control.
|
|
Existing text (and objects) are copied, and assigned to the member variable
|
|
for Lines after the widgetset class has been notified.
|
|
</p>
|
|
<p>
|
|
FinalizeWnd calls the inherited method prior to exit.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomMemo.Lines"/>
|
|
<link id="#lcl.controls.TWinControl.FinalizeWnd">TWinControl.FinalizeWnd</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.RealGetText">
|
|
<short>
|
|
Returns the textual content stored in Lines as a single String value.
|
|
</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="#rtl.classes.TStrings.Text">TStrings.Text</link>
|
|
<link id="#LCL.Controls.TControl.RealGetText">TControl.RealGetText</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.RealGetText.Result">
|
|
<short>The entire text in a single string.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.RealSetText">
|
|
<short>Replaces the value in <var>Lines.Text</var>.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="#LCL.Controls.TControl.RealSetText">TControl.RealSetText</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.RealSetText.AValue">
|
|
<short>
|
|
Sets the value for the control from a single string.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
Sets the value for the control from a single string. Lines are separated by
|
|
LineFeed (LF) and/or CarriageReturn (CR) characters.
|
|
</p>
|
|
</descr>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.GetCachedText" link="#lcl.controls.TControl.GetCachedText"/>
|
|
<element name="TCustomMemo.GetCachedText.Result">
|
|
<short>Always <b>False</b>; a cache is not implemented in TCustomMemo.</short>
|
|
</element>
|
|
<element name="TCustomMemo.GetCachedText.CachedText">
|
|
<short>TCaption instance with the cached value for the control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.GetCaretPos">
|
|
<short>Get the value for the CaretPos property.</short>
|
|
<descr>
|
|
<p>
|
|
<var>GetCaretPosition</var> is an overridden method in <var>TCustomMemo</var>
|
|
used to get the value for the <var>CaretPos</var> property. It calls the
|
|
GetCaretPos method in the widgetset class to get the return value for the
|
|
method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.CaretPos"/>
|
|
<link id="TCustomMemo.GetCaretPos"/>
|
|
<link id="TCustomMemo.SetCaretPos"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.GetCaretPos.Result">
|
|
<short>Returns the position of the editing cursor or caret.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.KeyUpAfterInterface">
|
|
<short>Handles Key Up events forwarded from the LCL interface.</short>
|
|
<descr>
|
|
<p>
|
|
<var>KeyUpAfterInterface</var> handles the <var>VK_RETURN</var> key code for
|
|
the control when WantReturns is set to <b>True</b>. It sets the value in Key
|
|
to 0 to indicate that the key code does not finish editing in the control.
|
|
</p>
|
|
<p>
|
|
It calls the inherited method prior to exit to handle the key code normally
|
|
when WantReturns is set to <b>False</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.KeyUpAfterInterface">TWinControl.KeyUpAfterInterface</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.KeyUpAfterInterface.Key">
|
|
<short>Virtual key code examined in the method.</short>
|
|
</element>
|
|
<element name="TCustomMemo.KeyUpAfterInterface.Shift">
|
|
<short>Shift, Ctrl, or Alt modifier for the key code.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.SetCaretPos">
|
|
<short>
|
|
Sets the position for the editing cursor or caret to the specified location.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>SetCaretPos</var> is an overridden method in <var>TCustomMemo</var> used
|
|
to set the position for the editing cursor (or caret).
|
|
</p>
|
|
<p>
|
|
<var>AValue</var> is a <var>TPoint</var> instance with the character and line
|
|
coordinates for the editing cursor. The X member contains the 0-based
|
|
relative column offset to the UTF-8-encoded character where the caret is
|
|
positioned. 0 is immediately before the first character in the current line
|
|
of text. The Y member contains the 0-based offset to the line where the caret
|
|
is positioned.
|
|
</p>
|
|
<p>
|
|
SetCaretPos ensures that the widgetset class is cast to a TWSCustomMemoClass
|
|
instance, and calls its SetCaretPos method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.SetCaretPos"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.SetCaretPos.AValue">
|
|
<short>New position for the editing cursor or caret.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.SetLines">
|
|
<short>Sets the value for the Lines property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomMemo.Lines"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.SetLines.Value">
|
|
<short>New value for the Lines property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.SetSelText">
|
|
<short>Sets the value for the SelText property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomEdit.SelText"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.SetSelText.AValue">
|
|
<short>New value for the SelText property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.SetWantReturns">
|
|
<short>Sets the value for the WantReturns property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomMemo.WantReturns"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.SetWantReturns.AValue">
|
|
<short>New value for the WantReturns property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.SetWantTabs">
|
|
<short>Sets the value for the WantTabs property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomMemo.WantTabs"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.SetWantTabs.NewWantTabs">
|
|
<short>New value for the WantTabs property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.SetWordWrap">
|
|
<short>Sets the value for the WordWrap property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomMemo.WordWrap"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.SetWordWrap.AValue">
|
|
<short>New value for the WordWrap property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.SetScrollBars">
|
|
<short>Sets the value for the ScrollBars property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomMemo.ScrollBars"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.SetScrollBars.AValue">
|
|
<short>New value for the ScrollBars property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.Loaded">
|
|
<short>
|
|
Performs actions needed when the component has been loaded using the LCL
|
|
streaming mechanism.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Loaded</var> is an overridden method in <var>TCustomMemo</var>, and
|
|
calls the inherited method on entry. When a handle has been allocated for the
|
|
control, the widgetset class is notified of the current values in the
|
|
<var>ScrollBars</var> and <var>WordWrap</var> properties.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomMemo.ScrollBars"/>
|
|
<link id="TCustomMemo.WordWrap"/>
|
|
<link id="#lcl.controls.TWinControl.Loaded">TWinControl.Loaded</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.CMWantSpecialKey">
|
|
<short>
|
|
Handles control messages for Return and Tab keys when enabled in the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>CMWantSpecialKey</var> is an overridden method in
|
|
<var>TCustomMemo</var>. It ensures that control messages for VK_RETURN and
|
|
VK_TAB keys are marked as handled when WantReturns or WantTabs are enabled in
|
|
the control. All other messages are handled by calling the inherited method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.CMWantSpecialKey"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.CMWantSpecialKey.Message">
|
|
<short>Message examined and updated in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.WMGetDlgCode">
|
|
<short>Handles Tab, Return, and Escape characters in control messages.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomMemo.WMGetDlgCode.Message">
|
|
<short>Message examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.GetControlClassDefaultSize">
|
|
<short>Gets the default size used for new instances of the class.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomMemo.GetControlClassDefaultSize.Result">
|
|
<short>Returns the default size for the control as a TPoint value.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.UTF8KeyPress">
|
|
<short>
|
|
Implements the handler for UTF8 key press events in the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>UTF8KeyPress</var> is an overridden method in <var>TCustomMemo</var>
|
|
which implements the handler for UTF-8-encoded key press events in the
|
|
control.
|
|
</p>
|
|
<p>
|
|
UTF8KeyPress calls the inherited method on entry to signal the OnUTF8KeyPress
|
|
event handler (when assigned). It ensures that a <b>Carriage Return</b>
|
|
(decimal character 13) key is handled using the setting specified in the
|
|
<var>WantReturns</var> property. When WantReturns is set to <b>False</b>, the
|
|
value in <var>UTF8Key</var> is set to an empty string (<b>''</b>) to discard
|
|
the character.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.UTF8KeyPress">TWinControl.UTF8KeyPress</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.UTF8KeyPress.UTF8Key">
|
|
<short>Key examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.CanShowEmulatedTextHint">
|
|
<short>
|
|
Indicates if an emulated TextHint can be displayed for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>CanShowEmulatedTextHint</var> is an overridden <var>Boolean</var>
|
|
function in <var>TCustomMemo</var>, and does <b>not</b> call the inherited
|
|
method in its implementation.
|
|
</p>
|
|
<p>
|
|
CanShowEmulatedTextHint determines whether an emulated <var>TextHint</var>
|
|
can be displayed for the control. Normally, this requires a control handle
|
|
and an unassigned value in the control text. In addition, some widgetsets
|
|
implement text hints natively, and do not require LCL to emulate the
|
|
capability (Windows, QT5). Emulated hint displays can also be suppressed when
|
|
the widgetset class is being freed (when the Lines in the control have
|
|
already been destroyed).
|
|
</p>
|
|
<p>
|
|
The current implementation always returns <b>False</b> for Memo controls.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.CanShowEmulatedTextHint"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.CanShowEmulatedTextHint.Result">
|
|
<short>
|
|
<b>True</b> when an emulated TextHint can be displayed for the control.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.Create">
|
|
<short>Constructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Create</var> is the overridden constructor for the class instance, and
|
|
calls the inherited constructor on entry.
|
|
</p>
|
|
<p>
|
|
Create allocates resources needed for the <var>Lines</var>,
|
|
<var>HorzScrollBar</var>, and <var>VertScrollBar</var> properties. It also
|
|
sets the default values for properties, including: <var>WantTabs</var>,
|
|
<var>WantReturns</var>, <var>WordWrap</var>, <var>AutoSelect</var>, and
|
|
<var>AutoSize</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomMemo.Destroy"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.Create.AOwner">
|
|
<short>Owner of the class instance.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.Destroy">
|
|
<short>Destructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Destroy</var> is the overridden destructor for the class instance.
|
|
Destroy ensures that resources allocated for the <var>Lines</var>,
|
|
<var>HorzScrollBar</var>, and <var>VertScrollBar</var> properties are freed
|
|
by calling the <var>FreeThenNil</var> routine in
|
|
<file>lazutilities.pas</file>.
|
|
</p>
|
|
<p>
|
|
Destroy calls the inherited destructor prior to exiting from the method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomMemo.Create"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.Append">
|
|
<short>Appends the specified text to the Lines in the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Append</var> is a procedure used to append the line of text in
|
|
<var>AValue</var> to the end of the values in the <var>Lines</var> property.
|
|
It is a convenience method, and calls the <var>Add</var> method in the Lines
|
|
member.
|
|
</p>
|
|
<code>
|
|
// var sLine: String;
|
|
// the following are equivalent
|
|
AMemo.Append(sLine);
|
|
AMemo.Lines.Add(sLine);
|
|
</code>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomMemo.Append.AValue">
|
|
<short>The text value added to Lines in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.ScrollBy">
|
|
<short>
|
|
Scrolls the visible area in the control by the specified amounts.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>ScrollBy</var> is an overridden method in <var>TCustomMemo</var> used to
|
|
scroll the visible area for the control by the specified amounts.
|
|
</p>
|
|
<p>
|
|
<var>DeltaX</var> and <var>DeltaY</var> contain the number of pixels the
|
|
content in the control is scrolled. DeltaX is applied to the horizontal
|
|
position. DeltaY is applied to the vertical position. A positive value means
|
|
that he control scrolls towards its bottom or right (respectively).
|
|
Conversely, a negative value scrolls the content towards its top or left.
|
|
</p>
|
|
<p>
|
|
ScrollBy calls the <var>ScrollBy_WS</var> method in the ancestor class. It
|
|
essentially replaces the method in the ancestor with the same name, and does
|
|
not call the inherited method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.ScrollBy">TWinControl.ScrollBy</link>
|
|
<link id="#lcl.controls.TWinControl.ScrollBy_WS">TWinControl.ScrollBy_WS</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomMemo.ScrollBy.DeltaX">
|
|
<short>Amount to scroll horizontally.</short>
|
|
</element>
|
|
<element name="TCustomMemo.ScrollBy.DeltaY">
|
|
<short>Amount to scroll vertically.</short>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.Lines">
|
|
<short>
|
|
Contains the individual lines of text in the multi-line edit control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Lines</var> is a <var>TStrings</var> property which contains the
|
|
individual lines of text in the multi-line edit control. The values in Lines
|
|
can be accessed using the <var>Strings</var> and <var>Text</var> properties
|
|
defined in TStrings. The Strings property in Lines allows an individual line
|
|
of text to be accessed by its ordinal position. For example:
|
|
</p>
|
|
<code>
|
|
// var sContent: String;
|
|
sContent := AMemo.Lines.Strings[2];
|
|
// equivalent to preceding since Strings is the default property
|
|
sContent := AMemo.Lines[2];
|
|
</code>
|
|
<p>
|
|
The Text property in Lines allows access to all of the values stored in
|
|
Lines. Text lines are separated by the <var>LineEnding</var> character
|
|
sequence defined for the host platform or operating system. For example:
|
|
</p>
|
|
<code>
|
|
// var sContent: String;
|
|
sContent := AMemo.Lines.Text;
|
|
</code>
|
|
<p>
|
|
Changing the values in Lines causes the Modified property to be set to
|
|
<b>True</b>. Use Text to make changes to the control value that do not cause
|
|
the Modified property to be updated.
|
|
</p>
|
|
<p>
|
|
Use the <var>Append</var> method to add a line of text to the end of the
|
|
values in Lines.
|
|
</p>
|
|
<p>
|
|
Set values in the <var>WantTabs</var>, <var>WantReturns</var>, and
|
|
<var>WordWrap</var> properties to control the content and behavior for the
|
|
multi-line edit control.
|
|
</p>
|
|
<p>
|
|
Use the <var>OnChange</var> event handler to perform actions needed when the
|
|
value for the control has been changed.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomMemo.Append"/>
|
|
<link id="TCustomMemo.WantTabs"/>
|
|
<link id="TCustomMemo.WantReturns"/>
|
|
<link id="TCustomMemo.WordWrap"/>
|
|
<link id="TCustomEdit.OnChange"/>
|
|
<link id="TCustomEdit.Modified"/>
|
|
<link id="#rtl.classes.TStrings">TStrings</link>
|
|
<link id="#lazutils.textstrings.TTextStrings">TTextStrings</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.HorzScrollBar">
|
|
<short>The horizontal scrollbar for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>HorzScrollBar</var> is a <var>TMemoScrollBar</var> property which
|
|
contains the horizontal scrollbar displayed for the control. Resources are
|
|
allocated to the property in the constructor, and freed in the destructor.
|
|
</p>
|
|
<p>
|
|
Use ScrollBars to determine the scrollbars visible for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomMemo.ScrollBars"/>
|
|
<link id="TCustomMemo.VertScrollBar"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.VertScrollBar">
|
|
<short>The vertical scrollbar for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>VertScrollBar</var> is a <var>TMemoScrollBar</var> property which
|
|
contains the vertical scrollbar displayed for the control. Resources are
|
|
allocated to the property in the constructor, and freed in the destructor.
|
|
</p>
|
|
<p>
|
|
Use ScrollBars to determine the scrollbars visible for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomMemo.ScrollBars"/>
|
|
<link id="TCustomMemo.HorzScrollBar"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.ScrollBars">
|
|
<short>
|
|
Defines the vertical and/or horizontal scrollbars used in the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>ScrollBars</var> is a <var>TScrollStyle</var> property which defines
|
|
whether the horizontal and vertical scrollbars are displayed for the control.
|
|
It is a single value from the <link id="TScrollStyle">TScrollStyle</link>
|
|
enumeration.
|
|
</p>
|
|
<p>
|
|
The default value for the property is <var>ssNone</var>, and disables both
|
|
horizontal and vertical scrollbars in the control.
|
|
</p>
|
|
<p>
|
|
Setting a new value for the property causes the widgetset class to be
|
|
notified when a handle has been allocated for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.WantReturns">
|
|
<short>
|
|
Allows the user to insert Return characters (line breaks) into the text.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
The <b>Enter</b> key is normally used to press the default button in a form,
|
|
so it cannot be used to add line breaks into the text by default. Set
|
|
<var>WantReturns</var> to <b>True</b> to allow line breaks to be entered
|
|
using <b>Enter</b> when the control has the input focus. <b>Ctrl+Enter</b>
|
|
can be used to insert a line break, even if WantReturns is set to
|
|
<b>False</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomMemo.WantTabs"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.WantTabs">
|
|
<short>Allows Tab characters to be entered into the text.</short>
|
|
<descr>
|
|
<p>
|
|
The Tab key is normally used to move the input focus to the next control, and
|
|
does not add Tab characters to the text.
|
|
</p>
|
|
<p>
|
|
When <var>WantTabs</var> is <b>True</b>, the Tab key inserts a Tab character
|
|
into the text, instead of moving the focus to then next control. Even if
|
|
WantTabs is <b>True</b>, the Tab key can be used to navigate <b>into</b> the
|
|
control. But it prevents use of Tab to <b>exit</b> the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomMemo.WantReturns"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomMemo.WordWrap">
|
|
<short>
|
|
Allows long lines (paragraphs) to wrap into multiple display lines.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
When <b>False</b>, the display for long lines is truncated at the right
|
|
margin for the control. It can be made visible when the text can be scrolled
|
|
horizontally.
|
|
</p>
|
|
<remark>
|
|
For the macOS Carbon widgetset, changing the property value to <b>False</b>
|
|
does not allow long text lines to be scrolled horizontally.
|
|
</remark>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomMemo.ScrollBars"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TEdit">
|
|
<short>Implements an edit control with a single line of text.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TEdit</var> is a <var>TCustomEdit</var> descendant which implements an
|
|
edit control presenting a single line of text. TEdit sets the visibility for
|
|
properties and events introduced in the TCustomEdit ancestor, and does not
|
|
introduce any new methods.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="HowToUseStdCtrls"/>
|
|
<link id="TCustomEdit"/>
|
|
<link id="TMemo"/>
|
|
<link id="#lcl.extctrls.TLabeledEdit">TLabeledEdit</link>
|
|
<link id="#lcl.maskedit.TMaskEdit">TMaskEdit</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TEdit.Action" link="#lcl.controls.TControl.Action"/>
|
|
<element name="TEdit.Align" link="#lcl.controls.TControl.Align"/>
|
|
<element name="TEdit.Alignment" link="#lcl.stdctrls.TCustomEdit.Alignment"/>
|
|
<element name="TEdit.Anchors" link="#lcl.controls.TControl.Anchors"/>
|
|
<element name="TEdit.AutoSelect" link="#lcl.stdctrls.TCustomEdit.AutoSelect"/>
|
|
<element name="TEdit.AutoSelected" link="#lcl.stdctrls.TCustomEdit.AutoSelected"/>
|
|
<element name="TEdit.AutoSize" link="#lcl.stdctrls.TCustomEdit.AutoSize"/>
|
|
<element name="TEdit.BidiMode" link="#lcl.controls.TControl.BiDiMode"/>
|
|
<element name="TEdit.BorderSpacing" link="#lcl.controls.TControl.BorderSpacing"/>
|
|
<element name="TEdit.BorderStyle" link="#lcl.stdctrls.TCustomEdit.BorderStyle"/>
|
|
<element name="TEdit.Color" link="#lcl.controls.TControl.Color"/>
|
|
<element name="TEdit.Constraints" link="#lcl.controls.TControl.Constraints"/>
|
|
<element name="TEdit.DoubleBuffered" link="#lcl.controls.TWinControl.DoubleBuffered"/>
|
|
<element name="TEdit.CharCase" link="#lcl.stdctrls.TCustomEdit.CharCase"/>
|
|
<element name="TEdit.DragCursor" link="#lcl.controls.TControl.DragCursor"/>
|
|
<element name="TEdit.DragMode" link="#lcl.controls.TControl.DragMode"/>
|
|
<element name="TEdit.DragKind" link="#lcl.controls.TControl.DragKind"/>
|
|
<element name="TEdit.EchoMode" link="#lcl.stdctrls.TCustomEdit.EchoMode"/>
|
|
<element name="TEdit.Enabled" link="#lcl.controls.TControl.Enabled"/>
|
|
<element name="TEdit.Font" link="#lcl.controls.TControl.Font"/>
|
|
<element name="TEdit.HideSelection" link="#lcl.stdctrls.TCustomEdit.HideSelection"/>
|
|
<element name="TEdit.MaxLength" link="#lcl.stdctrls.TCustomEdit.MaxLength"/>
|
|
<element name="TEdit.NumbersOnly" link="#lcl.stdctrls.TCustomEdit.NumbersOnly"/>
|
|
<element name="TEdit.ParentBidiMode" link="#lcl.controls.TControl.ParentBiDiMode"/>
|
|
<element name="TEdit.ParentColor" link="#lcl.stdctrls.TCustomEdit.ParentColor"/>
|
|
<element name="TEdit.ParentDoubleBuffered" link="#lcl.controls.TWinControl.ParentDoubleBuffered"/>
|
|
<element name="TEdit.ParentFont" link="#lcl.controls.TControl.ParentFont"/>
|
|
<element name="TEdit.ParentShowHint" link="#lcl.controls.TControl.ParentShowHint"/>
|
|
<element name="TEdit.PasswordChar" link="#lcl.stdctrls.TCustomEdit.PasswordChar"/>
|
|
<element name="TEdit.PopupMenu" link="#lcl.controls.TControl.PopupMenu"/>
|
|
<element name="TEdit.ReadOnly" link="#lcl.stdctrls.TCustomEdit.ReadOnly"/>
|
|
<element name="TEdit.ShowHint" link="#lcl.controls.TControl.ShowHint"/>
|
|
<element name="TEdit.TabOrder" link="#lcl.controls.TWinControl.TabOrder"/>
|
|
<element name="TEdit.TabStop" link="#lcl.stdctrls.TCustomEdit.TabStop"/>
|
|
<element name="TEdit.Text" link="#lcl.stdctrls.TCustomEdit.Text"/>
|
|
<element name="TEdit.TextHint" link="#lcl.stdctrls.TCustomEdit.TextHint"/>
|
|
<element name="TEdit.OnUTF8KeyPress" link="#lcl.controls.TWinControl.OnUTF8KeyPress"/>
|
|
<element name="TEdit.Visible" link="#lcl.controls.TControl.Visible"/>
|
|
<element name="TEdit.OnChange" link="#lcl.stdctrls.TCustomEdit.OnChange"/>
|
|
<element name="TEdit.OnChangeBounds" link="#lcl.controls.TControl.OnChangeBounds"/>
|
|
<element name="TEdit.OnClick" link="#lcl.controls.TControl.OnClick"/>
|
|
<element name="TEdit.OnContextPopup" link="#lcl.controls.TControl.OnContextPopup"/>
|
|
<element name="TEdit.OnDblClick" link="#lcl.controls.TControl.OnDblClick"/>
|
|
<element name="TEdit.OnDragDrop" link="#lcl.controls.TControl.OnDragDrop"/>
|
|
<element name="TEdit.OnDragOver" link="#lcl.controls.TControl.OnDragOver"/>
|
|
<element name="TEdit.OnEditingDone" link="#lcl.controls.TControl.OnEditingDone"/>
|
|
<element name="TEdit.OnEndDrag" link="#lcl.controls.TControl.OnEndDrag"/>
|
|
<element name="TEdit.OnEnter" link="#lcl.controls.TWinControl.OnEnter"/>
|
|
<element name="TEdit.OnExit" link="#lcl.controls.TWinControl.OnExit"/>
|
|
<element name="TEdit.OnKeyDown" link="#lcl.controls.TWinControl.OnKeyDown"/>
|
|
<element name="TEdit.OnKeyPress" link="#lcl.controls.TWinControl.OnKeyPress"/>
|
|
<element name="TEdit.OnKeyUp" link="#lcl.controls.TWinControl.OnKeyUp"/>
|
|
<element name="TEdit.OnMouseDown" link="#lcl.controls.TControl.OnMouseDown"/>
|
|
<element name="TEdit.OnMouseEnter" link="#lcl.controls.TControl.OnMouseEnter"/>
|
|
<element name="TEdit.OnMouseLeave" link="#lcl.controls.TControl.OnMouseLeave"/>
|
|
<element name="TEdit.OnMouseMove" link="#lcl.controls.TControl.OnMouseMove"/>
|
|
<element name="TEdit.OnMouseUp" link="#lcl.controls.TControl.OnMouseUp"/>
|
|
<element name="TEdit.OnMouseWheel" link="#lcl.controls.TControl.OnMouseWheel"/>
|
|
<element name="TEdit.OnMouseWheelDown" link="#lcl.controls.TControl.OnMouseWheelDown"/>
|
|
<element name="TEdit.OnMouseWheelUp" link="#lcl.controls.TControl.OnMouseWheelUp"/>
|
|
<element name="TEdit.OnResize" link="#lcl.controls.TControl.OnResize"/>
|
|
<element name="TEdit.OnStartDrag" link="#lcl.controls.TControl.OnStartDrag"/>
|
|
|
|
<element name="TMemo">
|
|
<short>Control used to display and edit multi-line text.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TMemo</var> is a <var>TCustomMemo</var> descendant which implements a
|
|
multi-line text edit control. TMemo sets the visibility for properties
|
|
introduced in TCustomMemo, but does not introduce any new methods.
|
|
</p>
|
|
<p>
|
|
The textual values in the multi-line control can be accessed using the
|
|
<var>Lines</var> property. An individual line of text can be accessed by its
|
|
ordinal position in the list of values. For example:
|
|
</p>
|
|
<code>
|
|
// var sContent: String; ...
|
|
sContent := AMemo.Lines[2];
|
|
</code>
|
|
<p>
|
|
This provides access to the third value in List (index positions are
|
|
zero-based).
|
|
</p>
|
|
<p>
|
|
The values for all of the text in Lines can be retrieved as a single String
|
|
using the <var>Text</var> property in the <var>TStrings</var> class instance.
|
|
Each line of text is separated by the <var>LineEnding</var> character
|
|
sequence for the host platform or operating system. For example:
|
|
</p>
|
|
<code>
|
|
// var sContent: String;
|
|
sContent := AMemo.Lines.Text;
|
|
</code>
|
|
<p>
|
|
Please note: There is a difference in TCustomMemo / TMemo between the
|
|
<var>Text</var> and <var>Lines</var> properties. Text is actually the Caption
|
|
for the control as inherited from TControl. Lines is the multi-line TStrings
|
|
instance specific to the memo control. Setting the control value using Text
|
|
does <b>NOT</b> cause the <var>Modified</var> property to be updated. Setting
|
|
the value using the Lines property does cause the Modified property to be
|
|
updated.
|
|
</p>
|
|
<p>
|
|
This is important if an <var>OnChange</var> event handler is used to detect
|
|
changes to the value in the control, and you need to identify whether the
|
|
change was performed in program code. You can identify a programmatic change
|
|
by manipulating the value in Modified.
|
|
</p>
|
|
<p>
|
|
For changes in program code, set Modified to <b>False</b> before setting the
|
|
value using the Text property. If Modified is <b>False</b> when OnChange is
|
|
signalled, the change occurred in program code. Modified can be set as
|
|
desired in your program code after the value is assigned to Text. For example:
|
|
</p>
|
|
<code>
|
|
// use Modified and Text to track program changes
|
|
procedure TForm1.Button1Click(Sender: TObject);
|
|
begin
|
|
Memo1.Modified := False;
|
|
Memo1.Text := 'Whiskey' + LineEnding + 'Tango' + LineEnding + 'Foxtrot';
|
|
Memo1.Modified := True;
|
|
end;
|
|
|
|
procedure TForm1.Memo1Change(Sender: TObject);
|
|
begin
|
|
if not TCustomMemo(Sender).Modified then
|
|
StaticText1.Caption := 'Memo changed in code'
|
|
else
|
|
StaticText1.Caption := 'Memo changed by user';
|
|
end;
|
|
</code>
|
|
<p>
|
|
Changes entered by the user are applied when methods update the Lines
|
|
property in the control. As a result, Modified is set to <b>True</b>. If
|
|
Modified is <b>True</b> in OnChange, the change was triggered by user
|
|
interaction with the control.
|
|
</p>
|
|
<p>
|
|
The value in Modified is retained when the control gains or loses focus
|
|
whether by keyboard navigation or by using the mouse.
|
|
</p>
|
|
<p>
|
|
The text displayed in the control uses the attributes defined in the
|
|
<var>Font</var> property. No capabilities are provided for formatting
|
|
individual characters, words, or lines in the content for the control.
|
|
</p>
|
|
<p>
|
|
Both horizontal and vertical scrollbars can be used in the control. Use the
|
|
<var>ScrollBar</var> property to define the scrollbars displayed for the
|
|
control. It can be used to enable automatic scrollbars which are only
|
|
displayed when the content for the control does not fit within its bounds.
|
|
</p>
|
|
<p>
|
|
Use the <var>Append</var> method to add a line to text to the values in Lines.
|
|
</p>
|
|
<p>
|
|
Use the <var>WantTabs</var> and <var>WantReturns</var> properties to
|
|
determine whether the corresponding keys are captured and stored in Lines.
|
|
This affects the way control messages are applied to the control.
|
|
</p>
|
|
<p>
|
|
Use <var>WordWrap</var> to indicate if the control should automatically wrap
|
|
a line of text longer than the visible area for the control.
|
|
</p>
|
|
<p>
|
|
Applications should use TEdit for a single line edit control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="HowToUseStdCtrls"/>
|
|
<link id="TCustomMemo"/>
|
|
<link id="TEdit"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TMemo.Align" link="#lcl.controls.TControl.Align"/>
|
|
<element name="TMemo.Alignment" link="#lcl.stdctrls.TCustomEdit.Alignment"/>
|
|
<element name="TMemo.Anchors" link="#lcl.controls.TControl.Anchors"/>
|
|
<element name="TMemo.BidiMode" link="#lcl.controls.TControl.BiDiMode"/>
|
|
<element name="TMemo.BorderSpacing" link="#lcl.controls.TControl.BorderSpacing"/>
|
|
<element name="TMemo.BorderStyle" link="#lcl.stdctrls.TCustomEdit.BorderStyle"/>
|
|
<element name="TMemo.CharCase" link="#lcl.stdctrls.TCustomEdit.CharCase"/>
|
|
<element name="TMemo.Color" link="#lcl.controls.TControl.Color"/>
|
|
<element name="TMemo.Constraints" link="#lcl.controls.TControl.Constraints"/>
|
|
<element name="TMemo.DoubleBuffered" link="#lcl.controls.TWinControl.DoubleBuffered"/>
|
|
<element name="TMemo.DragCursor" link="#lcl.controls.TControl.DragCursor"/>
|
|
<element name="TMemo.DragKind" link="#lcl.controls.TControl.DragKind"/>
|
|
<element name="TMemo.DragMode" link="#lcl.controls.TControl.DragMode"/>
|
|
<element name="TMemo.Enabled" link="#lcl.controls.TControl.Enabled"/>
|
|
<element name="TMemo.Font" link="#lcl.controls.TControl.Font"/>
|
|
<element name="TMemo.HideSelection" link="#lcl.stdctrls.TCustomEdit.HideSelection"/>
|
|
<element name="TMemo.Lines" link="#lcl.stdctrls.TCustomMemo.Lines"/>
|
|
<element name="TMemo.MaxLength" link="#lcl.stdctrls.TCustomEdit.MaxLength"/>
|
|
<element name="TMemo.ParentBidiMode" link="#lcl.controls.TControl.ParentBiDiMode"/>
|
|
<element name="TMemo.ParentColor" link="#lcl.controls.TControl.ParentColor"/>
|
|
<element name="TMemo.ParentDoubleBuffered" link="#lcl.controls.TWinControl.ParentDoubleBuffered"/>
|
|
<element name="TMemo.ParentFont" link="#lcl.controls.TControl.ParentFont"/>
|
|
<element name="TMemo.ParentShowHint" link="#lcl.controls.TControl.ParentShowHint"/>
|
|
<element name="TMemo.PopupMenu" link="#lcl.controls.TControl.PopupMenu"/>
|
|
<element name="TMemo.ReadOnly" link="#lcl.stdctrls.TCustomEdit.ReadOnly"/>
|
|
<element name="TMemo.ScrollBars" link="#lcl.stdctrls.TCustomMemo.ScrollBars"/>
|
|
<element name="TMemo.ShowHint" link="#lcl.controls.TControl.ShowHint"/>
|
|
<element name="TMemo.TabOrder" link="#lcl.controls.TWinControl.TabOrder"/>
|
|
<element name="TMemo.TabStop" link="#lcl.stdctrls.TCustomEdit.TabStop"/>
|
|
<element name="TMemo.Visible" link="#lcl.controls.TControl.Visible"/>
|
|
<element name="TMemo.WantReturns" link="#lcl.stdctrls.TCustomMemo.WantReturns"/>
|
|
<element name="TMemo.WantTabs" link="#lcl.stdctrls.TCustomMemo.WantTabs"/>
|
|
<element name="TMemo.WordWrap" link="#lcl.stdctrls.TCustomMemo.WordWrap"/>
|
|
<element name="TMemo.OnChange" link="#lcl.stdctrls.TCustomEdit.OnChange"/>
|
|
<element name="TMemo.OnClick" link="#lcl.controls.TControl.OnClick"/>
|
|
<element name="TMemo.OnContextPopup" link="#lcl.controls.TControl.OnContextPopup"/>
|
|
<element name="TMemo.OnDblClick" link="#lcl.controls.TControl.OnDblClick"/>
|
|
<element name="TMemo.OnDragDrop" link="#lcl.controls.TControl.OnDragDrop"/>
|
|
<element name="TMemo.OnDragOver" link="#lcl.controls.TControl.OnDragOver"/>
|
|
<element name="TMemo.OnEditingDone" link="#lcl.controls.TControl.OnEditingDone"/>
|
|
<element name="TMemo.OnEndDrag" link="#lcl.controls.TControl.OnEndDrag"/>
|
|
<element name="TMemo.OnEnter" link="#lcl.controls.TWinControl.OnEnter"/>
|
|
<element name="TMemo.OnExit" link="#lcl.controls.TWinControl.OnExit"/>
|
|
<element name="TMemo.OnKeyDown" link="#lcl.controls.TWinControl.OnKeyDown"/>
|
|
<element name="TMemo.OnKeyPress" link="#lcl.controls.TWinControl.OnKeyPress"/>
|
|
<element name="TMemo.OnKeyUp" link="#lcl.controls.TWinControl.OnKeyUp"/>
|
|
<element name="TMemo.OnMouseDown" link="#lcl.controls.TControl.OnMouseDown"/>
|
|
<element name="TMemo.OnMouseEnter" link="#lcl.controls.TControl.OnMouseEnter"/>
|
|
<element name="TMemo.OnMouseLeave" link="#lcl.controls.TControl.OnMouseLeave"/>
|
|
<element name="TMemo.OnMouseMove" link="#lcl.controls.TControl.OnMouseMove"/>
|
|
<element name="TMemo.OnMouseUp" link="#lcl.controls.TControl.OnMouseUp"/>
|
|
<element name="TMemo.OnMouseWheel" link="#lcl.controls.TControl.OnMouseWheel"/>
|
|
<element name="TMemo.OnMouseWheelDown" link="#lcl.controls.TControl.OnMouseWheelDown"/>
|
|
<element name="TMemo.OnMouseWheelUp" link="#lcl.controls.TControl.OnMouseWheelUp"/>
|
|
<element name="TMemo.OnMouseWheelHorz" link="#lcl.controls.TControl.OnMouseWheelHorz"/>
|
|
<element name="TMemo.OnMouseWheelLeft" link="#lcl.controls.TControl.OnMouseWheelLeft"/>
|
|
<element name="TMemo.OnMouseWheelRight" link="#lcl.controls.TControl.OnMouseWheelRight"/>
|
|
<element name="TMemo.OnResize" link="#lcl.controls.TControl.OnResize"/>
|
|
<element name="TMemo.OnStartDrag" link="#lcl.controls.TControl.OnStartDrag"/>
|
|
<element name="TMemo.OnUTF8KeyPress" link="#lcl.controls.TWinControl.OnUTF8KeyPress"/>
|
|
|
|
<element name="TStaticBorderStyle">
|
|
<short>Contains border styles used for static text controls.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TStaticBorderStyle</var> is an enumerated type with values that
|
|
represents border styles used for static text controls. TStaticBorderStyle is
|
|
the type used for the <var>BorderStyle</var> property in
|
|
<var>TCustomStaticText</var> and descendants.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomStaticText.BorderStyle"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TStaticBorderStyle.sbsNone">
|
|
<short>No border.</short>
|
|
</element>
|
|
<element name="TStaticBorderStyle.sbsSingle">
|
|
<short>Single line border.</short>
|
|
</element>
|
|
<element name="TStaticBorderStyle.sbsSunken">
|
|
<short>Sunken 3-D border.</short>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText">
|
|
<short>The base class for <var>TStaticText</var>.</short>
|
|
<descr>
|
|
<p>
|
|
Specifies the base ancestor for TStaticText, a control used to display static
|
|
text. TCustomStaticText is a TWinControl descendant. It can be used in place
|
|
of TLabel for situations where a TWinControl descendant is required.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.FAlignment"/>
|
|
<element name="TCustomStaticText.FFocusControl"/>
|
|
<element name="TCustomStaticText.FShowAccelChar"/>
|
|
<element name="TCustomStaticText.FStaticBorderStyle"/>
|
|
|
|
<element name="TCustomStaticText.GetTransparent" link="#lcl.stdctrls.TCustomStaticText.Transparent">
|
|
<short>Gets the value for the Transparent property.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomStaticText.GetTransparent.Result">
|
|
<short>Value for the Transparent property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.SetAlignment">
|
|
<short>Sets the value for the Alignment property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomStaticText.Alignment"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomStaticText.SetAlignment.Value">
|
|
<short>New value for the Alignment property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.SetStaticBorderStyle">
|
|
<short>Sets the value for the BorderStyle property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomStaticText.BorderStyle"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomStaticText.SetStaticBorderStyle.Value">
|
|
<short>New value for the StaticBorderStyle property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.SetTransparent">
|
|
<short>Sets the value for the Transparent property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomStaticText.Transparent"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomStaticText.SetTransparent.AValue">
|
|
<short>New value for the Transparent property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.WMActivate">
|
|
<short>Handles the window activate message for the control.</short>
|
|
<descr>
|
|
<p>
|
|
Received when the control has a registered activation shortcut for the
|
|
FocusControl. Defers the focus to FocusControl when assigned and enabled.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomStaticText.FocusControl"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomStaticText.WMActivate.Message">
|
|
<short>Window message examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
|
|
|
|
<element name="TCustomStaticText.GetLabelText">
|
|
<short>Returns the Caption for the control.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomStaticText.GetLabelText.Result">
|
|
<short>The text stored in Caption.</short>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.RealSetText" link="#lcl.controls.TControl.RealSetText"/>
|
|
<element name="TCustomStaticText.RealSetText.AValue"/>
|
|
|
|
<element name="TCustomStaticText.Notification">
|
|
<short>
|
|
Handles a notification that a component used in the control has been added or
|
|
removed.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Notification</var> is an overridden method in
|
|
<var>TCustomStaticText</var>, and calls the inherited method on entry.
|
|
Notification ensures that <var>FocusControl</var> is set to <b>Nil</b> when
|
|
it is the component for the <var>opRemove</var> <var>Operation</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomStaticText.FocusControl"/>
|
|
<link id="#lcl.controls.TControl.Notification">TControl.Notification</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomStaticText.Notification.AComponent">
|
|
<short>Component for the notification.</short>
|
|
</element>
|
|
<element name="TCustomStaticText.Notification.Operation">
|
|
<short>Operation for the notification.</short>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.SetFocusControl">
|
|
<short>Sets the value for the FocusControl property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomStaticText.FocusControl"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomStaticText.SetFocusControl.Val">
|
|
<short>New value for the FocusControl property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.SetShowAccelChar">
|
|
<short>Sets the value for the ShowAccelChar property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomStaticText.ShowAccelChar"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomStaticText.SetShowAccelChar.Val">
|
|
<short>New value for the ShowAccelChar property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.DialogChar">
|
|
<short>Handles an accelerator key for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>DialogChar</var> is an overridden method in
|
|
<var>TCustomStaticText</var>. It checks the character code in
|
|
<var>Message</var> to determine if it is used as the accelerator (shortcut)
|
|
in the <var>Caption</var> for the control. When the character code is found,
|
|
the <var>FocusControl</var> is given focus and the return value is set to
|
|
<b>True</b>.
|
|
</p>
|
|
<p>
|
|
If the character code is not found, the inherited method is called to
|
|
broadcast the Message to child controls and get the return value.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomStaticText.FocusControl"/>
|
|
<link id="#lcl.forms.IsAccel">IsAccel</link>
|
|
<link id="#lcl.controls.TWinControl.CanFocus">TWinControl.CanFocus</link>
|
|
<link id="#lcl.controls.TControl.Caption">TControl.Caption</link>
|
|
<link id="#lcl.controls.TControl.DialogChar">TControl.DialogChar</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomStaticText.DialogChar.Result">
|
|
<short><b>True</b> if the message was handled as an accelerator key.</short>
|
|
</element>
|
|
<element name="TCustomStaticText.DialogChar.Message">
|
|
<short>Message examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.GetControlClassDefaultSize" link="#lcl.controls.TControl.GetControlClassDefaultSize"/>
|
|
<element name="TCustomStaticText.GetControlClassDefaultSize.Result">
|
|
<short>
|
|
TSize instance with the default size for new instances of the class.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.Create">
|
|
<short>Constructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Create</var> is the overridden constructor for the class instance. It
|
|
sets the default values for properties and component style flags, as well as
|
|
the initial bounds for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.Create">TWinControl.Create</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomStaticText.Create.AOwner">
|
|
<short>Owner of the class instance.</short>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.Alignment">
|
|
<short>
|
|
The horizontal alignment for the text; centered, left- or right-justified.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
The default value for the property is taLeftJustify. Changing the value for
|
|
the property causes the widgetset class instance to be updated when its
|
|
Handle has been allocated.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.BorderStyle">
|
|
<short>The border drawn around the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>BorderStyle</var> is a <var>TStaticBorderStyle</var> property in
|
|
<var>TCustomStaticText</var>. it contains the line style used to draw the
|
|
borders around the static text control. It allows an additional border style
|
|
(<var>sbsSunken</var>) that is not available in its <var>TBorderStyle</var>
|
|
counterpart.
|
|
</p>
|
|
<p>
|
|
The default value for the property is <var>sbsNone</var>. Changing the value
|
|
for the property causes the widgetset class instance to be updated and
|
|
optionally resized when its Handle has been allocated.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TStaticBorderStyle"/>
|
|
<link id="#lcl.controls.TBorderStyle">TBorderStyle</link>
|
|
<link id="#lcl.controls.TWinControl.BorderStyle">TWinControl.BorderStyle</link>
|
|
<link id="#lcl.controls.TControl.AutoSize">TControl.AutoSize</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.FocusControl">
|
|
<short>The control that receives focus instead of this control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>FocusControl</var> is a <var>TWinControl</var> property with the control
|
|
given focus when the accelerator (shortcut) key is handled for the control.
|
|
The accelerator is defined using the '&' character in the
|
|
<var>Caption</var> for the control. If the key is detected and handled in
|
|
<var>DialogChar</var>, the control in FocusControl is given focus.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
<link id="TCustomStaticText.DialogChar"/>
|
|
<link id="TCustomStaticText.ShowAccelChar"/>
|
|
<link id="#lcl.controls.TControl.Caption">TControl.Caption</link>
|
|
<link id="#lcl.controls.TWinControl.Focused">TWinControl.Focused</link>
|
|
<link id="#lcl.controls.TWinControl.CanFocus">TWinControl.CanFocus</link>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.ShowAccelChar">
|
|
<short>
|
|
Indicates if an accelerator character is drawn in the displayed text.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>ShowAccelChar</var> is a <var>Boolean</var> property which indicates if
|
|
the character used as an accelerator key is drawn with an underline in the
|
|
control.
|
|
</p>
|
|
<p>
|
|
An accelerator is defined in <var>Caption</var> using a leading Ampersand
|
|
(&) character. The character immediately after the Ampersand character
|
|
sets the key value for the short cut. As an example: Setting Caption to
|
|
'&User Name' causes Alt+U to be used as the accelerator key. Any
|
|
occurrences of Ampersand (&) followed by a Space (#32) are <b>not</b>
|
|
displayed in the Caption value.
|
|
</p>
|
|
<p>
|
|
To display an Ampersand character in Caption, it must be entered as two
|
|
adjacent Ampersand characters (&&).
|
|
</p>
|
|
<p>
|
|
Set ShowAccelChar to <b>True</b> to enable underline drawing for the
|
|
accelerator character. The default value for the property is <b>True</b>.
|
|
Changing the value in the property causes the
|
|
<var>InvalidatePreferredSize</var> method to be called to update the bounds
|
|
for the control.
|
|
</p>
|
|
<p>
|
|
The value in ShowAccelChar is used in widgetset class methods, such as when
|
|
the text value is assigned and when the handle for the control is created (or
|
|
re-created).
|
|
</p>
|
|
<p>
|
|
Use <var>FocusControl</var> to specify the control which receives focus when
|
|
the accelerator key is handled in <var>DialogChar</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomStaticText.FocusControl"/>
|
|
<link id="TCustomStaticText.DialogChar"/>
|
|
<link id="TCustomStaticText.GetLabelText"/>
|
|
<link id="#lcl.controls.TControl.Caption">TControl.Caption</link>
|
|
<link id="#lcl.controls.TControl.InvalidatePreferredSize">TControl.InvalidatePreferredSize</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomStaticText.Transparent">
|
|
<short>
|
|
Makes the background color for the control transparent when <b>True</b>.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
The property value is <b>True</b> when the <var>csOpaque</var> flag is not
|
|
present in the <var>ControlStyle</var> property. Changing the value for the
|
|
property causes ControlStyle to be updated accordingly, and the control is
|
|
redrawn. The default value for the property is <b>True</b>.
|
|
</p>
|
|
<p>
|
|
Transparent is used when the <var>InvalidateControl</var> and
|
|
<var>InvalidateRect</var> methods are called to paint the control.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TStaticText">
|
|
<short>Control used to display a text value which does not change.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TStaticText</var> is a <var>TCustomStaticText</var> descendant which
|
|
implements a control used to display text that does not change. It can be
|
|
used in place of TLabel for situations where a TWinControl descendant is
|
|
required. It has a window handle, and allows the accelerator key for the
|
|
control to be forwarded to another windowed control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="HowToUseStdCtrls"/>
|
|
<link id="TCustomLabel"/>
|
|
<link id="TLabel"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TStaticText.Align" link="#lcl.controls.TControl.Align"/>
|
|
<element name="TStaticText.Alignment" link="#lcl.stdctrls.TCustomStaticText.Alignment"/>
|
|
<element name="TStaticText.Anchors" link="#lcl.controls.TControl.Anchors"/>
|
|
<element name="TStaticText.AutoSize" link="#lcl.controls.TControl.AutoSize"/>
|
|
<element name="TStaticText.BidiMode" link="#lcl.controls.TControl.BiDiMode"/>
|
|
<element name="TStaticText.BorderSpacing" link="#lcl.controls.TControl.BorderSpacing"/>
|
|
<element name="TStaticText.BorderStyle" link="#lcl.stdctrls.TCustomStaticText.BorderStyle"/>
|
|
<element name="TStaticText.Caption" link="#lcl.controls.TControl.Caption"/>
|
|
<element name="TStaticText.Color" link="#lcl.controls.TControl.Color"/>
|
|
<element name="TStaticText.Constraints" link="#lcl.controls.TControl.Constraints"/>
|
|
<element name="TStaticText.DoubleBuffered" link="#lcl.controls.TWinControl.DoubleBuffered"/>
|
|
<element name="TStaticText.DragCursor" link="#lcl.controls.TControl.DragCursor"/>
|
|
<element name="TStaticText.DragKind" link="#lcl.controls.TControl.DragKind"/>
|
|
<element name="TStaticText.DragMode" link="#lcl.controls.TControl.DragMode"/>
|
|
<element name="TStaticText.Enabled" link="#lcl.controls.TControl.Enabled"/>
|
|
<element name="TStaticText.FocusControl" link="#lcl.stdctrls.TCustomStaticText.FocusControl"/>
|
|
<element name="TStaticText.Font" link="#lcl.controls.TControl.Font"/>
|
|
|
|
<element name="TStaticText.ParentBidiMode" link="#lcl.controls.TControl.ParentBiDiMode"/>
|
|
<element name="TStaticText.ParentColor" link="#lcl.controls.TControl.ParentColor"/>
|
|
<element name="TStaticText.ParentDoubleBuffered" link="#lcl.controls.TWinControl.ParentDoubleBuffered"/>
|
|
<element name="TStaticText.ParentFont" link="#lcl.controls.TControl.ParentFont"/>
|
|
<element name="TStaticText.ParentShowHint" link="#lcl.controls.TControl.ParentShowHint"/>
|
|
<element name="TStaticText.PopupMenu" link="#lcl.controls.TControl.PopupMenu"/>
|
|
<element name="TStaticText.ShowAccelChar" link="#lcl.stdctrls.TCustomStaticText.ShowAccelChar"/>
|
|
<element name="TStaticText.ShowHint" link="#lcl.controls.TControl.ShowHint"/>
|
|
<element name="TStaticText.TabOrder" link="#lcl.controls.TWinControl.TabOrder"/>
|
|
<element name="TStaticText.TabStop" link="#lcl.controls.TWinControl.TabStop"/>
|
|
<element name="TStaticText.Transparent" link="#lcl.stdctrls.TCustomStaticText.Transparent"/>
|
|
<element name="TStaticText.Visible" link="#lcl.controls.TControl.Visible"/>
|
|
<element name="TStaticText.OnChangeBounds" link="#lcl.controls.TControl.OnChangeBounds"/>
|
|
<element name="TStaticText.OnClick" link="#lcl.controls.TControl.OnClick"/>
|
|
<element name="TStaticText.OnContextPopup" link="#lcl.controls.TControl.OnContextPopup"/>
|
|
<element name="TStaticText.OnDblClick" link="#lcl.controls.TControl.OnDblClick"/>
|
|
<element name="TStaticText.OnDragDrop" link="#lcl.controls.TControl.OnDragDrop"/>
|
|
<element name="TStaticText.OnDragOver" link="#lcl.controls.TControl.OnDragOver"/>
|
|
<element name="TStaticText.OnEndDrag" link="#lcl.controls.TControl.OnEndDrag"/>
|
|
<element name="TStaticText.OnMouseDown" link="#lcl.controls.TControl.OnMouseDown"/>
|
|
<element name="TStaticText.OnMouseEnter" link="#lcl.controls.TControl.OnMouseEnter"/>
|
|
<element name="TStaticText.OnMouseLeave" link="#lcl.controls.TControl.OnMouseLeave"/>
|
|
<element name="TStaticText.OnMouseMove" link="#lcl.controls.TControl.OnMouseMove"/>
|
|
<element name="TStaticText.OnMouseUp" link="#lcl.controls.TControl.OnMouseUp"/>
|
|
<element name="TStaticText.OnMouseWheel" link="#lcl.controls.TControl.OnMouseWheel"/>
|
|
<element name="TStaticText.OnMouseWheelDown" link="#lcl.controls.TControl.OnMouseWheelDown"/>
|
|
<element name="TStaticText.OnMouseWheelUp" link="#lcl.controls.TControl.OnMouseWheelUp"/>
|
|
<element name="TStaticText.OnMouseWheelHorz" link="#lcl.controls.TControl.OnMouseWheelHorz"/>
|
|
<element name="TStaticText.OnMouseWheelLeft" link="#lcl.controls.TControl.OnMouseWheelLeft"/>
|
|
<element name="TStaticText.OnMouseWheelRight" link="#lcl.controls.TControl.OnMouseWheelRight"/>
|
|
<element name="TStaticText.OnResize" link="#lcl.controls.TControl.OnResize"/>
|
|
<element name="TStaticText.OnStartDrag" link="#lcl.controls.TControl.OnStartDrag"/>
|
|
|
|
<element name="TButtonControl">
|
|
<short>Specifies a base class for button controls.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TButtonControl</var> is a <var>TWinControl</var> descendant which
|
|
specifies the base class used for controls with button-like behavior, such
|
|
as: <var>TCustomButton</var>, <var>TButton</var>, <var>TCustomCheckBox</var>,
|
|
<var>TCheckBox</var>, <var>TToggleBox</var>, and <var>TRadioButton</var>.
|
|
</p>
|
|
<p>
|
|
TButtonControl introduces properties, methods, and events needed to read and
|
|
write the Checked state for the control, handle Click events, and perform
|
|
actions using OnChange or an action link.
|
|
</p>
|
|
<p>
|
|
Do not create instances of TButtonControl in an application; use one of the
|
|
descendent classes.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TButtonControl.FClicksDisabled" link="#lcl.stdctrls.TButtonControl.ClicksDisabled"/>
|
|
<element name="TButtonControl.FOnChange" link="#lcl.stdctrls.TButtonControl.OnChange"/>
|
|
|
|
<element name="TButtonControl.IsCheckedStored" link="#lcl.stdctrls.TButtonControl.Checked"/>
|
|
<element name="TButtonControl.IsCheckedStored.Result">
|
|
<short>
|
|
<b>True</b> when the value in Checked is included in the LCL streaming
|
|
mechanism.
|
|
</short>
|
|
</element>
|
|
|
|
<!-- protected -->
|
|
<element name="TButtonControl.WMDefaultClicked">
|
|
<short>Implements the default handler for the LM_CLICKED message.</short>
|
|
</element>
|
|
<element name="TButtonControl.WMDefaultClicked.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TButtonControl.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
|
|
|
|
<element name="TButtonControl.GetActionLinkClass" link="#lcl.controls.TControl.GetActionLinkClass"/>
|
|
<element name="TButtonControl.GetActionLinkClass.Result"/>
|
|
|
|
<element name="TButtonControl.GetChecked">
|
|
<short>Gets the value for the Checked property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TButtonControl.Checked"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TButtonControl.GetChecked.Result">
|
|
<short>Value for the property.</short>
|
|
</element>
|
|
|
|
<element name="TButtonControl.SetChecked">
|
|
<short>Sets the value for the Checked property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TButtonControl.Checked"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TButtonControl.SetChecked.Value">
|
|
<short>New value for the Checked property.</short>
|
|
</element>
|
|
|
|
<element name="TButtonControl.DoOnChange">
|
|
<short>
|
|
Signals the OnEditingDone and OnChange event handlers (when assigned).
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>DoOnChange</var> performs actions needed when the button control is
|
|
clicked. DoOnChange calls <var>EditingDone</var> to signal the
|
|
<var>OnEditingDone</var> event handler (when assigned). The
|
|
<var>OnChange</var> event handler is also signalled (when assigned).
|
|
</p>
|
|
<p>
|
|
DoOnChange is called from the <var>Click</var> method before the inherited
|
|
method in TControl is executed. DoOnChange performs no actions at
|
|
design-time, during component streaming, or when the component is freed.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TButtonControl.OnChange"/>
|
|
<link id="#lcl.controls.TControl.EditingDone">TControl.EditingDone</link>
|
|
<link id="#lcl.controls.TControl.OnEditingDone">TControl.OnEditingDone</link>
|
|
<link id="#lcl.controls.TControl.Click">TControl.Click</link>
|
|
<link id="#rtl.classes.TComponent.ComponentState">TComponent.ComponentState</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TButtonControl.Click">
|
|
<short>
|
|
Performs actions needed when a click message is handled for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Click</var> is an overridden method in <var>TButtonControl</var>. Click
|
|
calls the <var>DoOnChange</var> method which signals the
|
|
<var>OnEditingDone</var> and <var>OnChange</var> event handlers (when
|
|
assigned).
|
|
</p>
|
|
<p>
|
|
Click calls the inherited method prior to exit. The inherited method (in
|
|
TControl) signals either the OnClick event handler or the OnExecute handler
|
|
in the Action. OnClick is used when Action has not been assigned, or when
|
|
OnClick contains a handler routine that differs from the one assigned to the
|
|
OnExecute handler in the Action.
|
|
</p>
|
|
<p>
|
|
Click can be called in two different usage scenarios. If standard click
|
|
events have been enabled in ControlStyle, it is called when the left mouse
|
|
button is released. It can also be called from a private LM_CLICKED message
|
|
handler in the control when standard click events are <b>not</b> enabled in
|
|
ControlStyle. This avoids duplicate click notifications when csClickEvents
|
|
is enabled in ControlStyle and Click is handled when the WMLButtonUp method
|
|
is executed.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TButtonControl.DoOnChange"/>
|
|
<link id="TButtonControl.OnChange"/>
|
|
<link id="#lcl.controls.TControl.Click">TControl.Click</link>
|
|
<link id="#lcl.controls.TControl.Action">TControl.Action</link>
|
|
<link id="#lcl.controls.TControl.OnEditingDone">TControl.OnEditingDone</link>
|
|
<link id="#lcl.controls.TControl.WMLButtonUp">TControl.WMLButtonUp</link>
|
|
<link id="#lcl.controls.TControl.ControlStyle">TControl.ControlStyle</link>
|
|
<link id="#lcl.controls.TControl.ControlState">TControl.ControlState</link>
|
|
<link id="#lcl.lmessages.LM_CLICKED">LM_CLICKED</link>
|
|
<link id="#rtl.classes.TBasicAction.OnExecute">TBasicAction.OnExecute</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TButtonControl.Create">
|
|
<short>Constructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Create</var> is the overridden constructor for the class instance, and
|
|
calls the inherited method on entry. <var>TheOwner</var> is the owner for the
|
|
new class instance, or <b>Nil</b>.
|
|
</p>
|
|
<p>
|
|
Create ensures that values in ControlStyle are updated to remove the
|
|
csMultiClicks, csAcceptsControls, and csCaptureMouse style flags. The
|
|
accessibility role and description are set to "Button" for the new class
|
|
instance.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TButtonControl.Create.TheOwner">
|
|
<short>Owner of the class instance.</short>
|
|
</element>
|
|
|
|
<element name="TButtonControl.Checked">
|
|
<short>Indicates the checked state for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Checked</var> is a <var>Boolean</var> property which indicates if the
|
|
control is displayed using its "checked" or "unchecked" state. The value for
|
|
the property is always <b>False</b> in <var>TButtonControl</var>, and is
|
|
overridden in descendent classes like TCustomCheckBox.
|
|
</p>
|
|
</descr>
|
|
</element>
|
|
|
|
<element name="TButtonControl.ClicksDisabled">
|
|
<short>
|
|
Disables calling the Click method without changing the Enabled state for
|
|
the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>ClicksDisabled</var> is a <var>Boolean</var> property which controls
|
|
whether the Click method is called when a the Checked property is changed in
|
|
the control. It is a protected property accessible in the TButtonControl and
|
|
TButtonActionLink classes.
|
|
</p>
|
|
<p>
|
|
The TCustomCheckBox descendant uses ClicksDisabled in its DoClickOnChange
|
|
method; when set to <b>False</b>, the Click method is called to signal both
|
|
the OnChange and OnClick handlers for the control. When set to <b>True</b>,
|
|
only the OnChange event handler is signalled.
|
|
</p>
|
|
<p>
|
|
ClicksDisabled is also used to prevent calling Click when the Checked
|
|
property in a linked button action is updated. This prevents duplicate OnChange / OnClick calls when Checked is updated in the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TButtonControl.DoOnChange"/>
|
|
<link id="TCustomCheckBox.DoClickOnChange"/>
|
|
<link id="TCustomCheckBox.Click"/>
|
|
<link id="TButtonActionLink.SetChecked"/>
|
|
<link id="TButtonActionLink.IsCheckedLinked"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TButtonControl.OnChange">
|
|
<short>
|
|
Event handler for signalled when the button control is clicked.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>OnChange</var> is signalled from the DoOnChange method, and occurs when
|
|
the Click method is called for the class instance. It is signalled after the
|
|
OnEditingDone event handler. The Sender argument contains the current button
|
|
control class instance (Self).
|
|
</p>
|
|
<p>
|
|
The OnClick event handler can also be used for the notification when
|
|
ClicksDisabled is set to <b>False</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TButtonControl.Click"/>
|
|
<link id="TButtonControl.DoOnChange"/>
|
|
<link id="TButtonControl.ClicksDisabled"/>
|
|
<link id="#lcl.controls.TControl.OnEditingDone">TControl.OnEditingDone</link>
|
|
<link id="#lcl.controls.TControl.OnClick">TControl.OnClick</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TButtonActionLink">
|
|
<short>Links a button control to a basic action.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TButtonActionLink</var> is a <var>TWinControlActionLink</var> descendant
|
|
which links a <var>TButtonControl</var> to a <var>TBasicAction</var>
|
|
component.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControlActionLink">TWinControlActionLink</link>
|
|
<link id="#rtl.classes.TBasicAction">TBasicAction</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TButtonActionLink.FClientButton">
|
|
<short>The button control for the action link.</short>
|
|
</element>
|
|
|
|
<element name="TButtonActionLink.AssignClient">
|
|
<short>Assigns the button control for the action link.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TButtonActionLink.AssignClient.AClient">
|
|
<short>Button assigned in the method.</short>
|
|
</element>
|
|
|
|
<element name="TButtonActionLink.SetChecked">
|
|
<short>Sets the value in the Checked property for the linked button.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="#LCL.ActnList.TActionLink.SetChecked">TActionLink.SetChecked</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TButtonActionLink.SetChecked.Value">
|
|
<short>New value for the checked property.</short>
|
|
</element>
|
|
|
|
<element name="TButtonActionLink.IsCheckedLinked" link="#LCL.ActnList.TActionLink.IsCheckedLinked"/>
|
|
<element name="TButtonActionLink.IsCheckedLinked.Result" link="#LCL.ActnList.TActionLink.IsCheckedLinked.Result"/>
|
|
|
|
<element name="TButtonActionLinkClass">
|
|
<short>
|
|
Class reference used to create new instances of TButtonActionLink.
|
|
</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TButtonActionLink"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomButton">
|
|
<short>The base class for a push button control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TCustomButton</var> is a <var>TButtonControl</var> descendant which
|
|
provides the base class for a push button control.
|
|
</p>
|
|
<p>
|
|
TCustomButton / TButton are used to perform an action when the control is
|
|
clicked. An <var>OnClick</var> event handler is provided to perform actions
|
|
needed when the push button is clicked.
|
|
</p>
|
|
<p>
|
|
Properties are provided to control the appearance and behavior for the
|
|
control. This includes whether it is the Default or Cancel button on a modal
|
|
form, and the modal result returned when the push button is clicked.
|
|
</p>
|
|
<p>
|
|
The control displays a text-based caption and is drawn using a style
|
|
appropriate for the platform or widgetset. An accelerator key can be defined
|
|
in the caption which simulates clicking on the push button when the shortcut
|
|
key is pressed. Support for TBasicAction from the FPC Run-time Library (RTL)
|
|
is present, but not published in the control.
|
|
</p>
|
|
<p>
|
|
Please note that the Caption is always center aligned on the push button. The
|
|
values in properties like BiDiMode and UseRightToLeftAlignment are ignored in
|
|
the control.
|
|
</p>
|
|
<p>
|
|
Please note that the Color for the control defaults to the system-defined
|
|
color used for button controls (clDefault or clBtnFace).
|
|
</p>
|
|
<p>
|
|
Do not create instances of TCustomButton; use the TButton descendant instead.
|
|
</p>
|
|
<p>
|
|
Use TBitBtn for a push button control which displays a bitmap instead of a
|
|
text-based caption.
|
|
</p>
|
|
<p>
|
|
Use TSpeedButton for a push button control which can remain in the pressed or
|
|
down state.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TButton"/>
|
|
<link id="TButtonControl"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomButton.FModalResult"/>
|
|
<element name="TCustomButton.FShortCut"/>
|
|
<element name="TCustomButton.FShortCutKey2"/>
|
|
<element name="TCustomButton.FCancel"/>
|
|
<element name="TCustomButton.FDefault"/>
|
|
<element name="TCustomButton.FActive"/>
|
|
|
|
<element name="TCustomButton.SetCancel">
|
|
<short>Sets the value for the Cancel property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomButton.Cancel"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomButton.SetCancel.NewCancel">
|
|
<short>New value for the Cancel property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.SetDefault">
|
|
<short>Sets the value for the Default property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomButton.Default"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomButton.SetDefault.Value">
|
|
<short>New value for the Default property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.SetModalResult">
|
|
<short>Sets the value for the ModalResult property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomButton.ModalResult"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomButton.SetModalResult.AValue">
|
|
<short>New value for the ModalResult property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.CMUIActivate">
|
|
<short>Handles a UIActivate control message.</short>
|
|
<descr>
|
|
<p>
|
|
Calls <var>UpdateFocus</var> to make the button the active control in the
|
|
parent form.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomButton.UpdateFocus"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomButton.CMUIActivate.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.WMSetFocus">
|
|
<short>Handles a set focus window message for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>WMSetFocus</var> calls the inherited method in <var>TWinControl</var> on
|
|
entry. Calls <var>UpdateFocus</var> to make the button the active control in
|
|
the parent form.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomButton.UpdateFocus"/>
|
|
<link id="#lcl.controls.TWinControl.WMSetFocus">TWinControl.WMSetFocus</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomButton.WMSetFocus.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.WMKillFocus">
|
|
<short>Handles a kill focus message for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>WMKillFocus</var> calls the inherited method in <var>TWinControl</var>
|
|
on entry. When the window handle in <var>Message</var> is the
|
|
<var>Handle</var> for the control, the <var>UpdateFocus</var> method is
|
|
called to remove the button as the active default control in the parent form.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.WMKillFocus">TWinControl.WMKillFocus</link>
|
|
<link id="#lcl.controls.TWinControl.Handle">TWinControl.Handle</link>
|
|
<link id="#lcl.lmessages.TLMKillFocus">TLMKillFocus</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomButton.WMKillFocus.Message">
|
|
<short>Message handled in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.UpdateFocus">
|
|
<short>Handles changes to the focus for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>UpdateFocus</var> is a method used to update the control and its parent
|
|
form when the control gets or loses focus on its form.
|
|
</p>
|
|
<p>
|
|
<var>AFocused</var> indicates whether the control is getting or losing focus.
|
|
</p>
|
|
<p>
|
|
UpdateFocus calls GetParentForm to get the parent form for the control. No
|
|
additional actions are performed in the method when the parent form has not
|
|
been assigned for the control.
|
|
</p>
|
|
<p>
|
|
When AFocused is <b>True</b>, <var>ActiveDefaultControlChanged</var> is
|
|
called to synchronize values in the control and the parent form. Active (in
|
|
the control) is updated to reflect its use as the ActiveControl on the parent
|
|
form. ActiveDefaultControl (in the parent form) is updated when the control
|
|
is focused.
|
|
</p>
|
|
<p>
|
|
UpdateFocus is called when the LM_SETFOCUS or LM_KILLFOCUS messages are
|
|
handled for the control. It is also called when the <var>CM_UIACTIVATE</var>
|
|
message is dispatched by the parent form when it is focused.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomButton.Active"/>
|
|
<link id="TCustomButton.Default"/>
|
|
<link id="TCustomButton.ActiveDefaultControlChanged"/>
|
|
<link id="#lcl.forms.GetParentForm">GetParentForm</link>
|
|
<link id="#lcl.forms.TCustomForm.SetWindowFocus">TCustomForm.SetWindowFocus</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomButton.UpdateFocus.AFocused">
|
|
<short>
|
|
<b>True</b> when the button is focused, <b>False</b> when it loses focus.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
|
|
|
|
<element name="TCustomButton.CreateWnd">
|
|
<short>Creates the handle for the widgetset class instance.</short>
|
|
<descr>
|
|
<p>
|
|
Calls the inherited method on entry. Calls UpdateDefaultCancel to set the
|
|
Default and Cancel controls on the Parent form (when needed).
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.CreateWnd">TWinControl.CreateWnd</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomButton.CreateParams">
|
|
<short>
|
|
Updates creation parameters to use values needed for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
Calls the inherited method on entry. Ensures that the style flags in
|
|
<var>Params</var> is updated to include <var>BS_DEFPUSHBUTTON</var> when the
|
|
<var>Default</var> property is <b>True</b>. Otherwise,
|
|
<var>BS_PUSHBUTTON</var> is included in the style flags.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.CreateParams">TWinControl.CreateParams</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomButton.CreateParams.Params">
|
|
<short>Creation parameters updated in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.ControlKeyDown" link="#lcl.controls.TWinControl.ControlKeyDown"/>
|
|
<element name="TCustomButton.ControlKeyDown.Key">
|
|
<short>Virtual key code examined in the method.</short>
|
|
</element>
|
|
<element name="TCustomButton.ControlKeyDown.Shift">
|
|
<short>Shift, Ctrl, or Alt modifier for the key.</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.ControlKeyUp" link="#lcl.controls.TWinControl.ControlKeyUp"/>
|
|
<element name="TCustomButton.ControlKeyUp.Key">
|
|
<short>Virtual key code examined in the method.</short>
|
|
</element>
|
|
<element name="TCustomButton.ControlKeyUp.Shift">
|
|
<short>Shift, Ctrl, or Alt modifier for the key.</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.DialogChar">
|
|
<short>Handles an accelerator key for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>DialogChar</var> is an overridden <var>Boolean</var> function used to
|
|
handle a <var>TLMKey</var> message received for the control.
|
|
</p>
|
|
<p>
|
|
DialogChar examines the <var>CharCode</var> member in <var>Message</var> to
|
|
determine if it contains the accelerator key defined in the
|
|
<var>Caption</var> for the control. If it is found, and the control can
|
|
receive focus, the <var>Click</var> method is called and the return value is
|
|
set to <b>True</b>. If the Message has a CharCode that is not the accelerator
|
|
key, the inherited method is called to handle the message and get the return
|
|
value for the method.
|
|
</p>
|
|
<p>
|
|
The return value is <b>True</b> when the Message is successfully handled for
|
|
the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomButton.Click"/>
|
|
<link id="#lcl.controls.TControl.DialogChar">TControl.DialogChar</link>
|
|
<link id="#lcl.controls.TControl.Caption">TControl.Caption</link>
|
|
<link id="#lcl.controls.TControl.OnClick">TControl.OnClick</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomButton.DialogChar.Result">
|
|
<short><b>True</b> if the message was handled as an accelerator key.</short>
|
|
</element>
|
|
<element name="TCustomButton.DialogChar.Message">
|
|
<short>Message examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.ChildClassAllowed" link="#lcl.controls.TWinControl.ChildClassAllowed"/>
|
|
<element name="TCustomButton.ChildClassAllowed.Result">
|
|
<short>
|
|
<b>True</b> when the widgetset class indicates child controls are allowed.
|
|
</short>
|
|
</element>
|
|
<element name="TCustomButton.ChildClassAllowed.ChildClass">
|
|
<short>Not used in the current implementation.</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.GetControlClassDefaultSize">
|
|
<short>Gets the default size for new instances of the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>GetControlClassDefaultSize</var> is an overridden <var>TSize</var> class
|
|
function used to get the default height and width for new instances of the
|
|
control. GetControlClassDefaultSize sets the <var>CX</var> and <var>CY</var>
|
|
members in the return value to the defaults used for the control. CX contains
|
|
the width and is set to 75 (pixels). CY contains the height and is set to 25
|
|
(pixels).
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.GetControlClassDefaultSize">TControl.GetControlClassDefaultSize</link>
|
|
<link id="#rtl.types.TSize">TSize</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomButton.GetControlClassDefaultSize.Result">
|
|
<short>TSize instance with the width and height for the new control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.WSSetDefault">
|
|
<short>
|
|
Notifies the widgetset class of a change to the Default property.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>WSSetDefault</var> is a method used to notify the widgetset class when
|
|
the value in the <var>Default</var> property has been changed.
|
|
</p>
|
|
<p>
|
|
WSSetDefault calls the <var>SetDefault</var> method in the widgetset class
|
|
using the value in the <var>Active</var> property. Active is used because
|
|
Default represents the design-time setting for the control. At run-time,
|
|
Active contains the default button clicked when the Enter key is pressed.
|
|
</p>
|
|
<p>
|
|
Called when a new value is assigned to the <var>Default</var> property.
|
|
Called when the value in <var>Active</var> is changed in the
|
|
<var>ActiveDefaultControlChanged</var> method. Called when
|
|
<var>UpdateDefaultCancel</var> sets the default and cancel controls on the
|
|
parent form.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomButton.Default"/>
|
|
<link id="TCustomButton.Active"/>
|
|
<link id="TCustomButton.ActiveDefaultControlChanged"/>
|
|
<link id="TCustomButton.UpdateDefaultCancel"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomButton.WSSetText">
|
|
<short>
|
|
Notifies the widgetset class of a change to the caption text for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>WSSetText</var> is an overridden method used to notify the widgetset
|
|
class instance when the value in the caption text has been changed. No
|
|
actions are performed in the method when the handle for the control has not
|
|
been allocated, or at design-time.
|
|
</p>
|
|
<p>
|
|
WSSetText ensures that <b>Ampersand</b> (<b>&</b>) characters used to
|
|
define an accelerator key in <var>AText</var> are handled for the widgetset
|
|
class. The Ampersand character(s) are removed from AText, and the virtual key
|
|
code equivalent is stored in the <var>Shortcut</var> property. By default,
|
|
the Shortcut uses the <var>ssAlt</var> shift modifier for the accelerator
|
|
key.
|
|
</p>
|
|
<p>
|
|
The <var>SetShortCut</var> method in the widgetset class is called to store
|
|
values from both <var>Shortcut</var> and <var>ShortCutKey2</var>.
|
|
</p>
|
|
<p>
|
|
The inherited <var>WSSetText</var> method is called prior to exit.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomButton.Shortcut"/>
|
|
<link id="TCustomButton.ShortCutKey2"/>
|
|
<link id="#lcl.controls.TControl.Text">TControl.Text</link>
|
|
<link id="#lcl.controls.TControl.Caption">TControl.Caption</link>
|
|
<link id="#lcl.menus.ShortCut">ShortCut</link>
|
|
<link id="#lcl.lcltype.Char2VK">Char2VK</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomButton.WSSetText.AText">
|
|
<short>New value for the caption text in the control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.TextChanged">
|
|
<short>
|
|
Performs actions needed when the CM_TEXTCHANGED message is handled in the
|
|
control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TextChanged</var> is an overridden method used to performs actions
|
|
needed when the <var>CM_TEXTCHANGED</var> message is handled in the control.
|
|
</p>
|
|
<p>
|
|
TextChanged calls <var>InvalidatePreferredSize</var> and causes the preferred
|
|
height and width for the control to be recalculated. When <var>Parent</var>
|
|
has been assigned and its <var>AutoSize</var> property is set to <b>True</b>,
|
|
the <var>AdjustSize</var> method in Parent is called. The AdjustSize method
|
|
for the control is called to resize the control or update control flags when
|
|
delayed auto-sizing is in use.
|
|
</p>
|
|
<p>
|
|
TextChanged calls the inherited method prior to exit.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.TextChanged">TControl.TextChanged</link>
|
|
<link id="#lcl.controls.TControl.AdjustSize">TControl.AdjustSize</link>
|
|
<link id="#lcl.controls.TControl.AutoSizeDelayed">TControl.AutoSizeDelayed</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomButton.Loaded">
|
|
<short>
|
|
Performs actions needed when LCL component streaming has been completed.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Loaded</var> is an overridden method used to perform actions needed when
|
|
LCL component streaming has been completed.
|
|
</p>
|
|
<p>
|
|
Loaded calls the inherited method on entry. Loaded calls
|
|
<var>UpdateDefaultCancel</var> to update the default and cancel controls on
|
|
the parent form.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomButton.UpdateDefaultCancel"/>
|
|
<link id="#lcl.controls.TWinControl.Loaded">TWinControl.Loaded</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomButton.UpdateDefaultCancel">
|
|
<short>Updates the Default and Cancel properties in the parent form.</short>
|
|
<descr>
|
|
<p>
|
|
<var>UpdateDefaultCancel</var> is a method used to update the default and
|
|
cancel controls on the parent form.
|
|
</p>
|
|
<p>
|
|
UpdateDefaultCancel calls <var>GetParentForm</var> to get the parent for the
|
|
control. When the parent form has been assigned, its
|
|
<var>DefaultControl</var> and <var>CancelControl</var> properties are updated
|
|
when needed. DefaultControl is updated when the <var>Default</var> property
|
|
is set to <b>True</b>. CancelControl is updated when the <var>Cancel</var>
|
|
property is set to <b>True</b>.
|
|
</p>
|
|
<p>
|
|
UpdateDefaultCancel calls <var>WSSetDefault</var> to notify the widgetset
|
|
class when the control is the default control.
|
|
</p>
|
|
<p>
|
|
UpdateDefaultCancel is called from the <var>CreateWnd</var> and
|
|
<var>Loaded</var> methods.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomButton.Cancel"/>
|
|
<link id="TCustomButton.Default"/>
|
|
<link id="TCustomButton.Active"/>
|
|
<link id="TCustomButton.WSSetDefault"/>
|
|
<link id="#lcl.forms.GetParentForm">GetParentForm</link>
|
|
<link id="#lcl.forms.TCustomForm.CancelControl">TCustomForm.CancelControl</link>
|
|
<link id="#lcl.forms.TCustomForm.DefaultControl">TCustomForm.DefaultControl</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomButton.Create">
|
|
<short>Constructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
Create is the overridden constructor for the class instance, and calls the
|
|
inherited constructor on entry.
|
|
</p>
|
|
<p>
|
|
Create updates the internal component style and <var>ControlStyle</var> with
|
|
values needed for the control. Create sets the default values for properties,
|
|
including:
|
|
</p>
|
|
<dl>
|
|
<dt>Color</dt>
|
|
<dd>Set to clDefault or clBtnFace (depending on the platform or
|
|
widgetset).</dd>
|
|
<dt>ParentColor</dt>
|
|
<dd>Set to <b>False</b>.</dd>
|
|
<dt>TabStop</dt>
|
|
<dd>Set to <b>True</b>.</dd>
|
|
<dt>Align</dt>
|
|
<dd>Set to alNone.</dd>
|
|
</dl>
|
|
<p>
|
|
Create calls <var>SetInitialBounds</var> using the height and width returned
|
|
from <var>GetControlClassDefaultSize</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomButton.Create.TheOwner">
|
|
<short>Owner of the class instance.</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.Click">
|
|
<short>Handles a button click event for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Click</var> is an overridden method used to handle a button click event
|
|
for the control.
|
|
</p>
|
|
<p>
|
|
Click uses the value in <var>ModalResult</var> to determine if the modal
|
|
result for the button control is posted to the parent form. When ModalResult
|
|
contains a value other than <var>mrNone</var>, it is stored in the
|
|
ModalResult property in the parent form (when assigned).
|
|
</p>
|
|
<p>
|
|
Click calls the inherited method to signal other event handlers or an
|
|
<var>Action</var> used for the control. <var>OnChange</var> is signalled
|
|
first. <var>OnClick</var> is signalled if an Action is not in use, or the
|
|
Action does not have an <var>OnExecute</var> event handler.
|
|
</p>
|
|
<p>
|
|
Click is called from <var>ExecuteDefaultAction</var> when the control is both
|
|
<var>Active</var> and the <var>Default</var> button on the parent form. It is
|
|
called from <var>ExecuteCancelAction</var> when the control is the
|
|
<var>Cancel</var> button on the parent form. It is called from
|
|
<var>DialogChar</var> when the accelerator key in <var>Shortcut</var> is
|
|
handled for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.Click">TControl.Click</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomButton.ExecuteDefaultAction">
|
|
<short>
|
|
Performs the Click method if the control is an Active or a Default button.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>ExecuteDefaultAction</var> is an overridden method used to perform the
|
|
<var>Click</var> method when the button control is <var>Active</var> or the
|
|
<var>Default</var> button. No actions are performed in the method when both
|
|
properties are set to <b>False</b>.
|
|
</p>
|
|
<p>
|
|
See <link id="TCustomButton.Click">Click</link> for more information about
|
|
the actions performed in the method.
|
|
</p>
|
|
<p>
|
|
ExecuteDefaultAction is called when a <b>Return</b> (<b>VK_RETURN</b>) key is
|
|
handled in the <var>Application</var> singleton for the ActiveDefaultControl
|
|
in a Form.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomButton.Click"/>
|
|
<link id="TCustomButton.Active"/>
|
|
<link id="TCustomButton.Default"/>
|
|
<link id="#lcl.controls.TControl.ExecuteDefaultAction">TControl.ExecuteDefaultAction</link>
|
|
<link id="#lcl.forms.TApplication.DoReturnKey">TApplication.DoReturnKey</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomButton.ExecuteCancelAction">
|
|
<short>Performs the Click method if the control is the Cancel button.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ExecuteCancelAction</var> is an overridden method used to perform the
|
|
<var>Click</var> method when the control is the <var>Cancel</var> button on
|
|
its parent form. No actions are performed in the method when Cancel is set to
|
|
<b>False</b>.
|
|
</p>
|
|
<p>
|
|
See <link id="TCustomButton.Click">Click</link> for more information about
|
|
the actions performed in the method.
|
|
</p>
|
|
<p>
|
|
ExecuteCancelAction is called when an <b>Escape</b> (<b>VK_ESCAPE</b>) key is
|
|
handled in the <var>Application</var> singleton for the CancelControl in a
|
|
Form.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomButton.Click"/>
|
|
<link id="TCustomButton.Cancel"/>
|
|
<link id="#lcl.controls.TControl.ExecuteCancelAction">TControl.ExecuteCancelAction</link>
|
|
<link id="#lcl.forms.TApplication.DoEscapeKey">TApplication.DoEscapeKey</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomButton.ActiveDefaultControlChanged">
|
|
<short>
|
|
Updates the button and/or parent form when the active default control has
|
|
been changed.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>ActiveDefaultControlChanged</var> is an overridden method used to update
|
|
properties in the control and/or parent form when active default control has
|
|
been changed. <var>NewControl</var> contains the control which is the
|
|
<var>ActiveControl</var> given focus on the parent form, or <b>Nil</b> when a
|
|
button control loses focus.
|
|
</p>
|
|
<p>
|
|
When NewControl is the current class instance, its Active property is set to
|
|
<b>True</b> to reflect the active focused control status. The
|
|
ActiveDefaultControl property in the parent form is set to the current
|
|
control to indicate it is also the active default control for the form.
|
|
</p>
|
|
<p>
|
|
When NewControl is assigned, but a different control than the current
|
|
instance, the button control is not focused and its Active property is set to
|
|
<b>False</b>.
|
|
</p>
|
|
<p>
|
|
When NewControl is unassigned (<b>Nil</b>), the button control has just lost
|
|
focus and Active is set to the value in the Default property. The control is
|
|
also removed as the ActiveDefaultControl in the parent form (when needed).
|
|
</p>
|
|
<p>
|
|
ActiveDefaultControlChanged is called from the <var>UpdateFocus</var> method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.ActiveDefaultControlChanged">TControl.ActiveDefaultControlChanged</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomButton.ActiveDefaultControlChanged.NewControl">
|
|
<short>
|
|
New value assigned as the active default control in the parent form.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.UpdateRolesForForm" link="#lcl.controls.TControl.UpdateRolesForForm"/>
|
|
|
|
<element name="TCustomButton.UseRightToLeftAlignment" link="#lcl.controls.TControl.UseRightToLeftAlignment"/>
|
|
<element name="TCustomButton.UseRightToLeftAlignment.Result">
|
|
<short>False; always uses center alignment.</short>
|
|
</element>
|
|
|
|
<element name="TCustomButton.Active">
|
|
<short><b>True</b> if the control is the Cancel or Default button.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Active</var> is a read-only <var>Boolean</var> property which indicates
|
|
if the control is the active default control for the parent form.
|
|
</p>
|
|
<p>
|
|
The property value is updated in <var>ActiveDefaultControlChanged</var> when
|
|
the focus for the control has been changed. It is set to <var>True</var> when
|
|
the button gains focus and becomes the <var>ActiveDefaultControl</var> on the
|
|
parent form. It is set to <var>False</var> when another control is set as the
|
|
ActiveDefaultControl on the parent form. It is set to the value in the
|
|
<var>Default</var> property when the ActiveDefaultControl is set to
|
|
<b>Nil</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomButton.ActiveDefaultControlChanged"/>
|
|
<link id="TCustomButton.Default"/>
|
|
<link id="#lcl.forms.TCustomForm.ActiveDefaultControl">TCustomForm.ActiveDefaultControl</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomButton.Cancel">
|
|
<short><b>True</b> if the button is the modal Cancel button.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Cancel</var> is a <var>Boolean</var> property which indicates if the
|
|
button is the modal Cancel button on a form. The default value for the
|
|
property is <b>False</b>.
|
|
</p>
|
|
<p>
|
|
Setting a new value for the property causes the <var>CancelControl</var> in
|
|
the parent form to be updated. When set to <b>True</b>, the CancelControl
|
|
property in the parent form is set the current class instance. When set to
|
|
the <b>False</b>, the form property is set to <b>Nil</b>.
|
|
</p>
|
|
<p>
|
|
No actions are performed in the method when <var>NewCancel</var> has the same
|
|
value as the Cancel property, or the parent form has not been assigned.
|
|
</p>
|
|
<p>
|
|
The value in Cancel is automatically updated in methods like
|
|
<var>UpdateRolesForForm</var> and <var>UpdateDefaultCancel</var>. The
|
|
property value is used in <var>ExecuteCancelAction</var> to determine if the
|
|
<var>Click</var> method can be called for the control.
|
|
</p>
|
|
<p>
|
|
Pressing <b>Escape (VK_ESCAPE)</b> in a modal form is equivalent to clicking
|
|
on the Cancel button.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomButton.Color">
|
|
<short>Color used for the button face.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Color</var> is a <var>TColor</var> property with color used for the
|
|
surface (or face) on the button control. The default value for the property
|
|
in <var>TCustomButton</var> is <var>clDefault</var> or <var>clBtnFace</var>,
|
|
depending on the platform or widgetset.
|
|
</p>
|
|
<p>
|
|
Changes made to the Color for the control or its Font are ignored in
|
|
TCustomButton. It is always drawn using the color(s) needed for the platform
|
|
or widgetset.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.Color">TControl.Color</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomButton.Default">
|
|
<short>
|
|
<b>True</b> if the button is the default button in a modal form.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Default</var> is a <var>Boolean</var> property which indicates if the
|
|
button can be used as the default button control on a form. Default is
|
|
essentially a design-time setting that indicates an intent. At run-time, the
|
|
default button is the ActiveDefaultControl on the form. The default value for
|
|
the property is <b>False</b>.
|
|
</p>
|
|
<p>
|
|
Setting a new value for the property causes the button control to be assigned
|
|
to the DefaultControl property in the parent form. The widgetset class is
|
|
notified when the property value is set.
|
|
</p>
|
|
<p>
|
|
The value in Default is used in the CreateParams method to determine style
|
|
flags included in the creation parameters for the control. It is used in
|
|
ExecuteDefaultAction to determine if the Click method can be called for the
|
|
control.
|
|
</p>
|
|
<p>
|
|
The value in Default is automatically updated in the UpdateRolesForForm
|
|
method.
|
|
</p>
|
|
<p>
|
|
Pressing <b>Enter</b> in a modal form is equivalent to clicking on the
|
|
Default button.
|
|
</p>
|
|
</descr>
|
|
</element>
|
|
|
|
<element name="TCustomButton.ModalResult">
|
|
<short>Value returned when the control is clicked in a modal form.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ModalResult</var> is a <var>TModalResult</var> property used to provide
|
|
the modal result value when the button control is clicked in a modal form.
|
|
</p>
|
|
<p>
|
|
The value in ModalResult is used in the Click method to update the
|
|
ModalResult value in the parent form (when assigned). The default value for
|
|
the property is mrNone, and indicates that the property value is not used as
|
|
a modal result in the Click method.
|
|
</p>
|
|
<p>
|
|
By convention, the value in ModalResult is associated with the usage and
|
|
caption for the button control. Common values and usage in ModalResult
|
|
includes:
|
|
</p>
|
|
<dl>
|
|
<dt>mrNone</dt>
|
|
<dd>ModalResult is not used.</dd>
|
|
<dt>mrOK</dt>
|
|
<dd>The OK button was clicked.</dd>
|
|
<dt>mrCancel</dt>
|
|
<dd>The Cancel button was clicked.</dd>
|
|
<dt>mrAbort</dt>
|
|
<dd>The Abort button was clicked or the modal dialog was aborted.</dd>
|
|
<dt>mrRetry</dt>
|
|
<dd>The Retry button was clicked.</dd>
|
|
<dt>mrIgnore</dt>
|
|
<dd>The Ignore button was clicked.</dd>
|
|
<dt>mrYes</dt>
|
|
<dd>The Yes button was clicked.</dd>
|
|
<dt>mrNo</dt>
|
|
<dd>The No button was clicked.</dd>
|
|
<dt>mrAll</dt>
|
|
<dd>The All button was clicked.</dd>
|
|
<dt>mrNoToAll</dt>
|
|
<dd>The No To All button was clicked.</dd>
|
|
<dt>mrYesToAll</dt>
|
|
<dd>The Yes To All button was clicked.</dd>
|
|
<dt>mrClose</dt>
|
|
<dd>The Close button was clicked.</dd>
|
|
</dl>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomButton.ParentColor">
|
|
<short>Indicates if the parent color is used to draw the control.</short>
|
|
<descr>
|
|
<p>
|
|
The default value for the property is <b>False</b> in
|
|
<var>TCustomButton</var>. Changes to the property value are ignored in
|
|
TCustomButton; the control is always drawn using the color(s) needed for the
|
|
platform or widgetset.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.ParentColor">TControl.ParentColor</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomButton.ShortCut">
|
|
<short>Shortcut key for the control.</short>
|
|
<descr>
|
|
<p>
|
|
ShortCut is a TShortCut property with the primary shortcut key or accelerator
|
|
key for the control. The property value contains both the virtual key code
|
|
and the shift modifier for the short cut key.
|
|
</p>
|
|
<p>
|
|
The value in ShortCut is automatically updated when a caption is assigned for
|
|
the control which includes an accelerator key. The accelerator key is
|
|
designated using an Ampersand (&) character before the character used as
|
|
the short cut. A value assigned in this manner always includes the ssCtrl
|
|
modifier in the short cut value by default.
|
|
</p>
|
|
<p>
|
|
The property value (along with ShortcutKey2) is passed to the widgetset class
|
|
when the WSSetText method is called.
|
|
</p>
|
|
<p>
|
|
Use the <var>ShortCut</var> and <var>ShortCutToKey</var> routines in the
|
|
<file>menu.pp</file> unit to convert to and from virtual key codes with shift
|
|
modifiers.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomButton.ShortCutKey2">
|
|
<short>Secondary shortcut key for the control.</short>
|
|
<descr>
|
|
<p>
|
|
ShortCutKey2 is a TShortCut property with the secondary shortcut key or
|
|
accelerator key for the control. The property value contains both the virtual
|
|
key code and the shift modifier for the short cut key. The property value
|
|
(along with Shortcut) is passed to the widgetset class when the WSSetText
|
|
method is called.
|
|
</p>
|
|
<p>
|
|
Use the <var>ShortCut</var> and <var>ShortCutToKey</var> routines in the
|
|
<file>menu.pp</file> unit to convert to and from virtual key codes with shift
|
|
modifiers.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomButton.TabStop">
|
|
<short>Enables keyboard navigation using the Tab or Shift+Tab keys.</short>
|
|
<descr>
|
|
<p>
|
|
Allows the user to navigate to or from this control by pressing the Tab or
|
|
Shift+Tab keys. The default value for the property is <b>True</b> in
|
|
TCustomButton.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.TabStop">TWinControl.TabStop</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TButton">
|
|
<short>Implements a push button control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TButton</var> is a <var>TCustomButton</var> descendant which implements
|
|
a push button control. TButton is used to perform an action when the control
|
|
is clicked. An <var>OnClick</var> event handler is provided to perform
|
|
actions needed when the push button is clicked. TButton provides support for
|
|
the <var>TBasicAction</var> class defined in the FPC Run-time Library (RTL).
|
|
</p>
|
|
<p>
|
|
Properties are provided to control the appearance and behavior for the
|
|
control. This includes whether it is the Default or Cancel button on a modal
|
|
form, and the modal result returned when the push button is clicked.
|
|
</p>
|
|
<p>
|
|
The control displays a text-based caption and is drawn using a style
|
|
appropriate for the platform or widgetset. An accelerator key can be defined
|
|
in the caption which simulates clicking on the push button when the shortcut
|
|
key is pressed.
|
|
</p>
|
|
<p>
|
|
Please note that the Caption in the control is always centered. The values in
|
|
properties like BiDiMode and UseRightToLeftAlignment are ignored in the
|
|
control.
|
|
</p>
|
|
<p>
|
|
Please note that the Color for the control defaults to the system-defined
|
|
color used for button controls.
|
|
</p>
|
|
<p>
|
|
TButton sets the visibility for properties defined in the ancestor class, and
|
|
does not introduce any new methods.
|
|
</p>
|
|
<p>
|
|
Use TBitBtn for a push button control which displays a bitmap instead of a
|
|
text-based caption.
|
|
</p>
|
|
<p>
|
|
Use TSpeedButton for a push button control which can remain in the pressed or
|
|
down state.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomButton"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TButton.Click" link="#lcl.controls.TControl.Click"/>
|
|
<element name="TButton.Action" link="#lcl.controls.TControl.Action"/>
|
|
<element name="TButton.Align" link="#lcl.controls.TControl.Align"/>
|
|
<element name="TButton.Anchors" link="#lcl.controls.TControl.Anchors"/>
|
|
<element name="TButton.AutoSize" link="#lcl.controls.TControl.AutoSize"/>
|
|
<element name="TButton.BidiMode" link="#lcl.controls.TControl.BiDiMode"/>
|
|
<element name="TButton.BorderSpacing" link="#lcl.controls.TControl.BorderSpacing"/>
|
|
<element name="TButton.Cancel" link="#lcl.stdctrls.TCustomButton.Cancel"/>
|
|
<element name="TButton.Caption" link="#lcl.controls.TControl.Caption"/>
|
|
<element name="TButton.Color" link="#lcl.stdctrls.TCustomButton.Color"/>
|
|
<element name="TButton.Constraints" link="#lcl.controls.TControl.Constraints"/>
|
|
<element name="TButton.Default" link="#lcl.stdctrls.TCustomButton.Default"/>
|
|
<element name="TButton.DoubleBuffered" link="#lcl.controls.TWinControl.DoubleBuffered"/>
|
|
<element name="TButton.DragCursor" link="#lcl.controls.TControl.DragCursor"/>
|
|
<element name="TButton.DragKind" link="#lcl.controls.TControl.DragKind"/>
|
|
<element name="TButton.DragMode" link="#lcl.controls.TControl.DragMode"/>
|
|
<element name="TButton.Enabled" link="#lcl.controls.TControl.Enabled"/>
|
|
<element name="TButton.Font" link="#lcl.controls.TControl.Font"/>
|
|
<element name="TButton.ParentBidiMode" link="#lcl.controls.TControl.ParentBiDiMode"/>
|
|
<element name="TButton.ModalResult" link="#lcl.stdctrls.TCustomButton.ModalResult"/>
|
|
<element name="TButton.ParentDoubleBuffered" link="#lcl.controls.TWinControl.ParentDoubleBuffered"/>
|
|
<element name="TButton.ParentFont" link="#lcl.controls.TControl.ParentFont"/>
|
|
<element name="TButton.ParentShowHint" link="#lcl.controls.TControl.ParentShowHint"/>
|
|
<element name="TButton.PopupMenu" link="#lcl.controls.TControl.PopupMenu"/>
|
|
<element name="TButton.ShowHint" link="#lcl.controls.TControl.ShowHint"/>
|
|
<element name="TButton.TabOrder" link="#lcl.controls.TWinControl.TabOrder"/>
|
|
<element name="TButton.TabStop" link="#lcl.stdctrls.TCustomButton.TabStop"/>
|
|
<element name="TButton.Visible" link="#lcl.controls.TControl.Visible"/>
|
|
<element name="TButton.OnChangeBounds" link="#lcl.controls.TControl.OnChangeBounds"/>
|
|
<element name="TButton.OnClick" link="#lcl.controls.TControl.OnClick"/>
|
|
<element name="TButton.OnContextPopup" link="#lcl.controls.TControl.OnContextPopup"/>
|
|
<element name="TButton.OnDragDrop" link="#lcl.controls.TControl.OnDragDrop"/>
|
|
<element name="TButton.OnDragOver" link="#lcl.controls.TControl.OnDragOver"/>
|
|
<element name="TButton.OnEndDrag" link="#lcl.controls.TControl.OnEndDrag"/>
|
|
<element name="TButton.OnEnter" link="#lcl.controls.TWinControl.OnEnter"/>
|
|
<element name="TButton.OnExit" link="#lcl.controls.TWinControl.OnExit"/>
|
|
<element name="TButton.OnKeyDown" link="#lcl.controls.TWinControl.OnKeyDown"/>
|
|
<element name="TButton.OnKeyPress" link="#lcl.controls.TWinControl.OnKeyPress"/>
|
|
<element name="TButton.OnKeyUp" link="#lcl.controls.TWinControl.OnKeyUp"/>
|
|
<element name="TButton.OnMouseDown" link="#lcl.controls.TControl.OnMouseDown"/>
|
|
<element name="TButton.OnMouseEnter" link="#lcl.controls.TControl.OnMouseEnter"/>
|
|
<element name="TButton.OnMouseLeave" link="#lcl.controls.TControl.OnMouseLeave"/>
|
|
<element name="TButton.OnMouseMove" link="#lcl.controls.TControl.OnMouseMove"/>
|
|
<element name="TButton.OnMouseUp" link="#lcl.controls.TControl.OnMouseUp"/>
|
|
<element name="TButton.OnMouseWheel" link="#lcl.controls.TControl.OnMouseWheel"/>
|
|
<element name="TButton.OnMouseWheelDown" link="#lcl.controls.TControl.OnMouseWheelDown"/>
|
|
<element name="TButton.OnMouseWheelUp" link="#lcl.controls.TControl.OnMouseWheelUp"/>
|
|
<element name="TButton.OnResize" link="#lcl.controls.TControl.OnResize"/>
|
|
<element name="TButton.OnStartDrag" link="#lcl.controls.TControl.OnStartDrag"/>
|
|
<element name="TButton.OnUTF8KeyPress" link="#lcl.controls.TWinControl.OnUTF8KeyPress"/>
|
|
|
|
<element name="TCheckBoxState">
|
|
<short>Represents the states for a check box.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TCheckBoxState</var> is an enumerated type with values which represent
|
|
the states for a check box control. TCheckBoxState is the type used to
|
|
implement the <var>State</var> property in <var>TCustomCheckBox</var> and
|
|
descendent classes.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCheckBoxState.cbUnchecked">
|
|
<short>
|
|
The check box has no check mark, indicating that the item is not selected.
|
|
</short>
|
|
</element>
|
|
<element name="TCheckBoxState.cbChecked">
|
|
<short>
|
|
The check box has a check mark in it, indicating that the item is selected.
|
|
</short>
|
|
</element>
|
|
<element name="TCheckBoxState.cbGrayed">
|
|
<short>
|
|
The check box state cannot be changed by the user, or is disabled.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox">
|
|
<short>The base class for a check box component.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TCustomCheckBox</var> is a <var>TButtonControl</var> descendant which
|
|
specifies an interface used for a check box control. It is the common
|
|
ancestor for <var>TCheckBox</var>, <var>TToggleBox</var>,
|
|
<var>TRadioButton</var>, and <var>TDBCheckBox</var> descendants.
|
|
</p>
|
|
<p>
|
|
A check box control allows the user to choose the state for the control
|
|
independent of other check box controls (unlike a radio button).
|
|
TCustomCheckBox introduces the <var>State</var> property which contains the
|
|
check, unchecked, or grayed state for the control. The <var>AllowGrayed</var>
|
|
property indicates if the grayed state is allowed in the control; otherwise
|
|
only checked and unchecked are used. The <var>Checked</var> property allows
|
|
the value in State to be updated by setting a <var>Boolean</var> value that
|
|
indicates the check or unchecked state for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TButtonControl"/>
|
|
<link id="TCheckBox"/>
|
|
<link id="TToggleBox"/>
|
|
<link id="TRadioButton"/>
|
|
<link id="#lcl.dbctrls.TDBCheckBox">TDBCheckBox</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.FAllowGrayed" link="#lcl.stdctrls.TCustomCheckBox.AllowGrayed"/>
|
|
<element name="TCustomCheckBox.FState" link="#lcl.stdctrls.TCustomCheckBox.State"/>
|
|
<element name="TCustomCheckBox.FShortCut" link="#lcl.stdctrls.TCustomCheckBox.ShortCut"/>
|
|
<element name="TCustomCheckBox.FShortCutKey2" link="#lcl.stdctrls.TCustomCheckBox.ShortCutKey2"/>
|
|
|
|
<element name="TCustomCheckBox.SetState">
|
|
<short>Sets the value for the State property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.State"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomCheckBox.SetState.Value">
|
|
<short>New value for the State property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.GetState">
|
|
<short>Gets the value for the State property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.State"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomCheckBox.GetState.Result">
|
|
<short>Value for the property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.DoChange">
|
|
<short>Handles the LM_CHANGED message for the control.</short>
|
|
<descr>
|
|
<p>
|
|
Performs either the <var>OnClick</var> or the <var>OnChange</var> event
|
|
handler. Use <var>ClicksDisabled</var> is control the event handler signalled.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomCheckBox.DoChange.Msg">
|
|
<short>Message examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
|
|
|
|
<element name="TCustomCheckBox.Click">
|
|
<short>Performs actions needed when the control is clicked.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Click</var> is an overridden method in <var>TCustomCheckBox</var>. It
|
|
performs actions needed when the value in the Checked or State property is
|
|
changed for the control, whether by mouse click or setting the value in
|
|
program code.
|
|
</p>
|
|
<p>
|
|
TCustomCheckBox re-implements the method from the TButtonControl ancestor to
|
|
ignore the mouse click event. It has an empty implementation, and does not call the inherited method.
|
|
</p>
|
|
<p>
|
|
In TCustomCheckBox, the click action may be handled in two different ways.
|
|
The action may be performed (in TControl) when the left mouse button is
|
|
released and standard click events are enabled in ControlStyle. The click
|
|
action may be performed in DoClickOnChange (by calling the inherited Click
|
|
method) when the value in State is changed and ClicksDisabled is <b>False</b>.
|
|
</p>
|
|
<p>
|
|
This avoids a duplicate click notification when csClickEvents is enabled in
|
|
ControlStyle and Click is handled when the WMLButtonUp method is executed, or
|
|
when the click is triggered by an associated Action.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.State"/>
|
|
<link id="TCustomCheckBox.DoClickOnChange"/>
|
|
<link id="TButtonControl.Checked"/>
|
|
<link id="TButtonControl.ClicksDisabled"/>
|
|
<link id="#lcl.controls.TControl.Click">TControl.Click</link>
|
|
<link id="#lcl.controls.TControl.Action">TControl.Action</link>
|
|
<link id="#lcl.controls.TControl.ControlState">TControl.ControlState</link>
|
|
<link id="#lcl.controls.TControl.ControlStyle">TControl.ControlStyle</link>
|
|
<link id="#lcl.controls.TControl.WMLButtonUp">TControl.WMLButtonUp</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.DoClickOnChange">
|
|
<short>Implements the Click behavior for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>DoClickOnChange</var> is a procedure used to signal event handler(s)
|
|
when the <b>LM_CHANGED</b> message is handled for the control.
|
|
DoClickOnChange calls the <var>Changed</var> method to dispatch the control
|
|
message.
|
|
</p>
|
|
<p>
|
|
DoClickOnChange uses the value from the inherited <var>ClicksDisabled</var>
|
|
property to determine the event handler(s) signalled in the method. When
|
|
ClicksDisabled is <b>False</b>, the inherited <var>Click</var> method is
|
|
called. When set to <b>True</b>, the <var>DoOnChange</var> method is called
|
|
to signal the <var>OnEditingDone</var> and <var>OnChange</var> event
|
|
handlers. This emulates the <var>OnClick</var> behavior in the Delphi VCL.
|
|
</p>
|
|
<p>
|
|
DoClickOnChange is called when a new value is assigned to the
|
|
<var>Checked</var> property. DoClickOnChange is also called from the DoChange
|
|
method after the value in State has been retrieved for the control. Please
|
|
note that DoChange is not used in the current LCL implementation.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.State"/>
|
|
<link id="TButtonControl.ClicksDisabled"/>
|
|
<link id="TButtonControl.Click"/>
|
|
<link id="TButtonControl.Checked"/>
|
|
<link id="TButtonControl.DoOnChange"/>
|
|
<link id="TButtonControl.OnChange"/>
|
|
<link id="#lcl.controls.TControl.Changed">TControl.Changed</link>
|
|
<link id="#lcl.controls.TControl.EditingDone">TControl.EditingDone</link>
|
|
<link id="#lcl.controls.TControl.OnEditingDone">TControl.OnEditingDone</link>
|
|
<link id="#lcl.controls.TControl.OnClick">TControl.OnClick</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.RetrieveState">
|
|
<short>
|
|
Gets the checked state for the control from the widgetset class.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>RetrieveState</var> is a <var>TCheckBoxState</var> function used to get
|
|
the checked, unchecked, or grayed state for the control from the widgetset
|
|
class. Access to the widgetset class requires a valid handle in the control.
|
|
If the handle has not been assigned, the return value is set to the existing
|
|
value in the <var>State</var> member.
|
|
</p>
|
|
<p>
|
|
RetrieveState calls the RetrieveState method in the widgetset class to get
|
|
the return value for the method.
|
|
</p>
|
|
<p>
|
|
RetrieveState is used to get the value for the <var>State</var> property. It
|
|
is called from <var>DoChange</var> when the <var>LM_CHANGED</var> control
|
|
message is handled for the control. It is also called when setting a new
|
|
value for the <var>Checked</var> property.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomCheckBox.RetrieveState.Result">
|
|
<short>TCheckBoxState value returned from the widgetset class.</short>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.InitializeWnd" link="#lcl.controls.TWinControl.InitializeWnd"/>
|
|
|
|
<element name="TCustomCheckBox.Toggle">
|
|
<short>
|
|
Alternates between the checked and the unchecked state in the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
Calls <var>GetChecked</var> to retrieve the current checked <var>State</var>
|
|
for the control. Negates the value and calls <var>SetChecked</var> to store
|
|
the toggled state value. Called from <var>DialogChar</var> when the
|
|
accelerator key is handled for the focused control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.DialogChar"/>
|
|
<link id="TCustomCheckBox.State"/>
|
|
<link id="TCustomCheckBox.GetChecked"/>
|
|
<link id="TCustomCheckBox.SetChecked"/>
|
|
<link id="TCustomCheckBox.ShortCut"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.DialogChar">
|
|
<short>Implements support for accelerator keys in the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>DialogChar</var> is an overridden <var>Boolean</var> function in
|
|
<var>TCustomCheckBox</var> which handles accelerator keys in messages for the
|
|
control. The return value is set to <b>True</b> when the check box is
|
|
successfully toggled in the method.
|
|
</p>
|
|
<p>
|
|
<var>Message</var> is the TLMKey instance with the key code examined in the
|
|
method. When the key code matches the accelerator key in <var>Caption</var>,
|
|
the control is focused and its <var>State</var> is toggled. If the control
|
|
cannot be focused, or Message does not represent an accelerator key code, the
|
|
inherited method is called to get the return value.
|
|
</p>
|
|
<p>
|
|
This method is called even if the control is disabled or hidden. Provided for
|
|
Delphi VCL compatibility.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.DialogChar">TControl.DialogChar</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomCheckBox.DialogChar.Result">
|
|
<short>
|
|
<b>True</b> when the control state is toggled by the accelerator key.
|
|
</short>
|
|
</element>
|
|
<element name="TCustomCheckBox.DialogChar.Message">
|
|
<short>Control message examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.GetChecked">
|
|
<short>Gets the value for the Checked property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.State"/>
|
|
<link id="TButtonControl.Checked"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomCheckBox.GetChecked.Result">
|
|
<short>Value for the Checked property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.SetChecked">
|
|
<short>Sets the value for the Checked property.</short>
|
|
<descr/>
|
|
<version>
|
|
Modified in LCL version 3.0 to remove processing for the linked Action and
|
|
OnChange or OnClick notifications. In 3.0, these actions are performed when
|
|
the State property is updated.
|
|
</version>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.State"/>
|
|
<link id="TButtonControl.Checked"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomCheckBox.SetChecked.Value">
|
|
<short>New value for the Checked property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.RealSetText" link="#lcl.controls.TControl.RealSetText"/>
|
|
<element name="TCustomCheckBox.RealSetText.Value">
|
|
<short>New value stored in the text/caption for the control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.ApplyChanges">
|
|
<short>
|
|
Sets the checked state in the widgetset class and redraws the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>ApplyChanges</var> is a method used to send a SetState message to the
|
|
widgetset class to update the visual appearance for the control. No actions
|
|
are performed in the method if a handle has not been allocated for the
|
|
control, or during component streaming.
|
|
</p>
|
|
<p>
|
|
ApplyChanges is called when a new value is assigned to the <var>Checked</var>
|
|
or <var>State</var> properties.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.State"/>
|
|
<link id="TButtonControl.Checked"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.GetControlClassDefaultSize" link="#lcl.controls.TControl.GetControlClassDefaultSize"/>
|
|
<element name="TCustomCheckBox.GetControlClassDefaultSize.Result">
|
|
<short>Size used for new instances of the class.</short>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.Loaded">
|
|
<short>
|
|
Performs actions needed after the control is loaded using LCL component
|
|
streaming.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Loaded</var> is an overridden method in <var>TCustomCheckBox</var>.
|
|
Loaded ensures that the value in <var>State</var> is passed to the widgetset
|
|
class when a handle has been allocated for the control. This prevents loss of
|
|
the stored value in State during component streaming. The inherited method is
|
|
called prior to exit.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.State"/>
|
|
<link id="#lcl.controls.TWinControl.Loaded">TWinControl.Loaded</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.WSSetText" link="#lcl.controls.TWinControl.WSSetText"/>
|
|
<element name="TCustomCheckBox.WSSetText.AText">
|
|
<short>New value for Text.</short>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.TextChanged">
|
|
<short>
|
|
Performs actions needed when the CM_TEXTCHANGED message is handled for the
|
|
control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TextChanged</var> is an overridden method in <var>TCustomCheckBox</var>
|
|
used to perform actions needed when the <var>CM_TEXTCHANGED</var> control
|
|
message is handled for the control.
|
|
</p>
|
|
<p>
|
|
TextChanged calls <var>InvalidatePreferredSize</var> to update the sizing
|
|
flags for the control and its Parent. When <var>Parent</var> has been
|
|
assigned and its <var>AutoSize</var> property is <b>True</b>, its
|
|
<var>AdjustSize</var> method is called. The <var>AdjustSize</var> method in
|
|
the control is called to resize the visible control.
|
|
</p>
|
|
<p>
|
|
TextChanged calls the inherited method prior to exit.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.TextChanged">TControl.TextChanged</link>
|
|
<link id="#lcl.controls.TControl.InvalidatePreferredSize">TControl.InvalidatePreferredSize</link>
|
|
<link id="#lcl.controls.TControl.AdjustSize">TControl.AdjustSize</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.CreateParams" link="#lcl.controls.TWinControl.CreateParams"/>
|
|
<element name="TCustomCheckBox.CreateParams.Params">
|
|
<short>Creation parameters updated in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.Create">
|
|
<short>Constructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Create</var> is the overridden constructor for the class instance, and
|
|
calls the inherited method on entry. <var>TheOwner</var> is the owner for the
|
|
new class instance. Create sets the default value for the
|
|
<var>Alignment</var> property to <var>taRightJustify</var>. Create calls
|
|
<var>SetInitialBounds</var> to set the initial control size to the values
|
|
returned from the <var>GetControlClassDefaultSize</var> class method.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomCheckBox.Create.TheOwner">
|
|
<short>Owner of the class instance.</short>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.Alignment">
|
|
<short>
|
|
Indicates the alignment for the caption text in the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Alignment</var> is a <var>TLeftRight</var> property with the horizontal
|
|
alignment for the caption text relative to the check box. The default value
|
|
for the property is <var>taRightJustify</var>, and causes the text to be
|
|
drawn to the right of the check box. Use <var>taLeftJustify</var> to draw the
|
|
caption text in front of the check box.
|
|
</p>
|
|
<p>
|
|
Changing the value for the property causes the widgetset class to be updated
|
|
when its <var>Handle</var> has been allocated.
|
|
</p>
|
|
<p>
|
|
The value in Alignment is used to set the creation parameters for the control.
|
|
</p>
|
|
<remark>
|
|
The Alignment property is not supported for macOS Carbon, Cocoa, and GTK2
|
|
widgetsets. Set BiDiMode to bdRightToLeft as an alternative.
|
|
</remark>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.CreateParams"/>
|
|
<link id="#rtl.classes.TLeftRight">TLeftRight</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.AllowGrayed">
|
|
<short>Allows the check box to use a "grayed" state.</short>
|
|
<descr>
|
|
<p>
|
|
If <var>AllowGrayed</var> is set to <b>True</b>, the check box has three
|
|
possible values in the State property: checked, unchecked and grayed. If
|
|
<var>AllowGrayed</var> is set to <b>False</b>, the check box has only two
|
|
possible states: checked and unchecked.
|
|
</p>
|
|
</descr>
|
|
<example file="stdctrls/tcustomcheckbox_allowgrayed.pas"/>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.State"/>
|
|
<link id="TButtonControl.Checked"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.State">
|
|
<short>The check, unchecked, or grayed state for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>State</var> is a <var>TCheckBoxState</var> property which indicates
|
|
whether the check box is checked, unchecked or grayed (disabled). The default
|
|
value for the property is cbUnchecked. State allows the control to be set to
|
|
the indeterminate (grayed) state when AllowGrayed is set to <b>True</b>.
|
|
Otherwise, it has the same behavior as using the Checked property.
|
|
</p>
|
|
<p>
|
|
See <var>TCheckBoxState</var> for the available enumeration values and their
|
|
meanings in the <var>State</var> property.
|
|
</p>
|
|
<p>
|
|
Reading the property value calls RetrieveState to get the value from the
|
|
widgetset class when its handle has been allocated. Otherwise, the existing
|
|
value for the member is used.
|
|
</p>
|
|
<p>
|
|
Changing the value for the property causes the Checked property in an
|
|
assigned Action to be updated if the property value is not cbGrayed and the
|
|
ClicksDisabled property is <b>False</b>. The value is applied to the Action
|
|
without updating the value in the control. This prevents recursion when the
|
|
value is changed in the linked action.
|
|
</p>
|
|
<p>
|
|
Otherwise, ApplyChanges is called to update the visual appearance for the
|
|
control. DoClickOnChange is called to post the control message for the
|
|
updated control, and to emulate the OnChange and OnClick behavior in the
|
|
Delphi VCL. When ClicksDisabled is <b>True</b>, only the OnChange event
|
|
handler is signalled. When set to <b>False</b>, the Click method is called to
|
|
signal both the OnChange and OnClick event handlers (when assigned).
|
|
</p>
|
|
<p>
|
|
The Grayed property in Action is set to <b>False</b> when the new property
|
|
value is cbChecked or cbUnchecked.
|
|
</p>
|
|
</descr>
|
|
<version>
|
|
Modified in LCL version 3.0 to prevent recursive updates (and event
|
|
notifications) when the action is changed.
|
|
</version>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.AllowGrayed"/>
|
|
<link id="TButtonControl.Checked"/>
|
|
<link id="TCustomCheckBox.RetrieveState"/>
|
|
<link id="TCustomCheckBox.ApplyChanges"/>
|
|
<link id="TCustomCheckBox.DoClickOnChange"/>
|
|
<link id="TCheckBoxState"/>
|
|
<link id="#lcl.actnlist.TCustomAction.Grayed">TCustomAction.Grayed</link>
|
|
</seealso>
|
|
<example file="stdctrls/tcustomcheckbox_allowgrayed.pas"/>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.ShortCut">
|
|
<short>Shortcut key for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ShortCut</var> is a <var>TShortCut</var> property with the primary
|
|
shortcut key or accelerator key for the control. The property value contains
|
|
both the virtual key code and the shift modifier for the short cut key.
|
|
</p>
|
|
<p>
|
|
The value in ShortCut is automatically updated when a caption is assigned for
|
|
the control which includes an accelerator key. The accelerator key is
|
|
designated using an Ampersand (&) character before the value used as the
|
|
short cut. A value assigned in this manner always includes the ssCtrl
|
|
modifier in the short cut value by default.
|
|
</p>
|
|
<p>
|
|
Use the <var>ShortCut</var> and <var>ShortCutToKey</var> routines in the
|
|
<file>menu.pp</file> unit to convert to and from virtual key codes with shift
|
|
modifiers.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.ShortCutKey2">
|
|
<short>Secondary shortcut key for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ShortCutKey2</var> is a <var>TShortCut</var> property with the secondary
|
|
shortcut key or accelerator key for the control. The property value contains
|
|
both the virtual key code and the shift modifier combined to form the short
|
|
cut key.
|
|
</p>
|
|
<p>
|
|
The property value (along with Shortcut) is passed to the widgetset class
|
|
when the WSSetText method is called.
|
|
</p>
|
|
<p>
|
|
Use the <var>ShortCut</var> and <var>ShortCutToKey</var> routines in the
|
|
<file>menu.pp</file> unit to convert to and from virtual key codes with shift
|
|
modifiers.
|
|
</p>
|
|
<remark>
|
|
ShortCutKey2 may not be implemented for all platforms supported in the LCL.
|
|
</remark>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomCheckBox.TabStop" link="#lcl.controls.TWinControl.TabStop"/>
|
|
<element name="TCustomCheckBox.OnChange" link="#lcl.stdctrls.TButtonControl.OnChange"/>
|
|
|
|
<element name="TCheckBox">
|
|
<short>A label with a box which can contain a check mark.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TCheckBox</var> is a <var>TCustomCheckBox</var> descendant which
|
|
implements a check box component. A check box control allows the user to
|
|
choose the state for the control independent of other check box controls
|
|
(unlike a radio button).
|
|
</p>
|
|
<p>
|
|
The <var>State</var> property contains the checked, unchecked, or grayed
|
|
state for the control. The <var>AllowGrayed</var> property indicates if the
|
|
grayed state is allowed in the control; otherwise only checked and unchecked
|
|
are used. The <var>Checked</var> property allows the value in State to be
|
|
updated by setting a <var>Boolean</var> value that indicates if the control
|
|
is check or unchecked.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="HowToUseStdCtrls"/>
|
|
<link id="TButtonControl"/>
|
|
<link id="TCustomCheckBox"/>
|
|
<link id="TToggleBox"/>
|
|
<link id="TRadioButton"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCheckBox.Create">
|
|
<short>Constructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Create</var> is the overridden constructor for the class instance, and
|
|
calls the inherited method on entry. Creates sets the internal component
|
|
style for the control to <var>csCheckbox</var>, and sets the default values
|
|
for properties including <var>TabStop</var> (<b>True</b>) and
|
|
<var>AutoSize</var> (<b>True</b>).
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCheckBox.Create.TheOwner">
|
|
<short>Owner of the class instance.</short>
|
|
</element>
|
|
|
|
<element name="TCheckBox.Action" link="#lcl.controls.TControl.Action"/>
|
|
<element name="TCheckBox.Align" link="#lcl.controls.TControl.Align"/>
|
|
<element name="TCheckBox.Alignment" link="#lcl.stdctrls.TCustomCheckBox.Alignment"/>
|
|
<element name="TCheckBox.AllowGrayed" link="#lcl.stdctrls.TCustomCheckBox.AllowGrayed"/>
|
|
<element name="TCheckBox.Anchors" link="#lcl.controls.TControl.Anchors"/>
|
|
|
|
<element name="TCheckBox.AutoSize">
|
|
<short>
|
|
Allows automatic adjustment of the size for the control, according to its
|
|
content.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
The action performed depends on the control type. For example, a label or
|
|
button can become bigger or smaller to accommodate a longer or shorter
|
|
caption. The default value for the property is <b>True</b> in TCheckBox, and
|
|
enables auto-sizing of the text displayed for the control instance.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.AutoSize">TControl.AutoSize</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCheckBox.BidiMode" link="#lcl.controls.TControl.BiDiMode"/>
|
|
<element name="TCheckBox.BorderSpacing" link="#lcl.controls.TControl.BorderSpacing"/>
|
|
<element name="TCheckBox.Caption" link="#lcl.controls.TControl.Caption"/>
|
|
<element name="TCheckBox.Checked" link="#lcl.stdctrls.TButtonControl.Checked"/>
|
|
<element name="TCheckBox.Color" link="#lcl.controls.TControl.Color"/>
|
|
<element name="TCheckBox.Constraints" link="#lcl.controls.TControl.Constraints"/>
|
|
<element name="TCheckBox.DoubleBuffered" link="#lcl.controls.TWinControl.DoubleBuffered"/>
|
|
<element name="TCheckBox.DragCursor" link="#lcl.controls.TControl.DragCursor"/>
|
|
<element name="TCheckBox.DragKind" link="#lcl.controls.TControl.DragKind"/>
|
|
<element name="TCheckBox.DragMode" link="#lcl.controls.TControl.DragMode"/>
|
|
<element name="TCheckBox.Enabled" link="#lcl.controls.TControl.Enabled"/>
|
|
<element name="TCheckBox.Font" link="#lcl.controls.TControl.Font"/>
|
|
<element name="TCheckBox.Hint" link="#lcl.controls.TControl.Hint"/>
|
|
<element name="TCheckBox.ParentBidiMode" link="#lcl.controls.TControl.ParentBiDiMode"/>
|
|
<element name="TCheckBox.ParentColor" link="#lcl.controls.TControl.ParentColor"/>
|
|
<element name="TCheckBox.ParentDoubleBuffered" link="#lcl.controls.TWinControl.ParentDoubleBuffered"/>
|
|
<element name="TCheckBox.ParentFont" link="#lcl.controls.TControl.ParentFont"/>
|
|
<element name="TCheckBox.ParentShowHint" link="#lcl.controls.TControl.ParentShowHint"/>
|
|
<element name="TCheckBox.PopupMenu" link="#lcl.controls.TControl.PopupMenu"/>
|
|
<element name="TCheckBox.ShowHint" link="#lcl.controls.TControl.ShowHint"/>
|
|
<element name="TCheckBox.State" link="#lcl.stdctrls.TCustomCheckBox.State"/>
|
|
<element name="TCheckBox.TabOrder" link="#lcl.controls.TWinControl.TabOrder"/>
|
|
<element name="TCheckBox.TabStop">
|
|
|
|
<short>Enables keyboard navigation using the Tab or Shift+Tab keys.</short>
|
|
<descr>
|
|
<p>
|
|
Allows the user to navigate to or from this control by pressing the Tab or
|
|
Shift+Tab keys. The default value for the property is <b>True</b> in
|
|
TCheckBox.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.TabStop">TWinControl.TabStop</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCheckBox.Visible" link="#lcl.controls.TControl.Visible"/>
|
|
<element name="TCheckBox.OnChange" link="#lcl.stdctrls.TButtonControl.OnChange"/>
|
|
<element name="TCheckBox.OnChangeBounds" link="#lcl.controls.TControl.OnChangeBounds"/>
|
|
|
|
<element name="TCheckBox.OnContextPopup" link="#lcl.controls.TControl.OnContextPopup"/>
|
|
<element name="TCheckBox.OnDragDrop" link="#lcl.controls.TControl.OnDragDrop"/>
|
|
<element name="TCheckBox.OnDragOver" link="#lcl.controls.TControl.OnDragOver"/>
|
|
<element name="TCheckBox.OnEditingDone" link="#lcl.controls.TControl.OnEditingDone"/>
|
|
<element name="TCheckBox.OnEndDrag" link="#lcl.controls.TControl.OnEndDrag"/>
|
|
<element name="TCheckBox.OnEnter" link="#lcl.controls.TWinControl.OnEnter"/>
|
|
<element name="TCheckBox.OnExit" link="#lcl.controls.TWinControl.OnExit"/>
|
|
<element name="TCheckBox.OnKeyDown" link="#lcl.controls.TWinControl.OnKeyDown"/>
|
|
<element name="TCheckBox.OnKeyPress" link="#lcl.controls.TWinControl.OnKeyPress"/>
|
|
<element name="TCheckBox.OnKeyUp" link="#lcl.controls.TWinControl.OnKeyUp"/>
|
|
<element name="TCheckBox.OnMouseDown" link="#lcl.controls.TControl.OnMouseDown"/>
|
|
<element name="TCheckBox.OnMouseEnter" link="#lcl.controls.TControl.OnMouseEnter"/>
|
|
<element name="TCheckBox.OnMouseLeave" link="#lcl.controls.TControl.OnMouseLeave"/>
|
|
<element name="TCheckBox.OnMouseMove" link="#lcl.controls.TControl.OnMouseMove"/>
|
|
<element name="TCheckBox.OnMouseUp" link="#lcl.controls.TControl.OnMouseUp"/>
|
|
<element name="TCheckBox.OnMouseWheel" link="#lcl.controls.TControl.OnMouseWheel"/>
|
|
<element name="TCheckBox.OnMouseWheelDown" link="#lcl.controls.TControl.OnMouseWheelDown"/>
|
|
<element name="TCheckBox.OnMouseWheelUp" link="#lcl.controls.TControl.OnMouseWheelUp"/>
|
|
<element name="TCheckBox.OnResize" link="#lcl.controls.TControl.OnResize"/>
|
|
<element name="TCheckBox.OnStartDrag" link="#lcl.controls.TControl.OnStartDrag"/>
|
|
<element name="TCheckBox.OnUTF8KeyPress" link="#lcl.controls.TWinControl.OnUTF8KeyPress"/>
|
|
|
|
<element name="TToggleBox">
|
|
<short>A labelled box capable of being checked or unchecked.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TToggleBox</var> is <var>TCustomCheckBox</var> descendant which
|
|
implements a labelled control with state values like a check box control.
|
|
TToggleBox differs from <var>TCheckBox</var> in that it displays only the
|
|
<var>Caption</var> text for the control; the graphical check mark
|
|
representation is not used. TToggleBox is similar in appearance to a push
|
|
button control. The control state determines whether the button is drawn
|
|
using its up or down position.
|
|
</p>
|
|
<p>
|
|
The programmer must ensure that the <var>OnClick</var> event handler
|
|
recognizes the <var>State</var> of the control, takes the appropriate
|
|
<var>Action</var>, and stores the <var>State</var> into the appropriate
|
|
storage.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="HowToUseStdCtrls"/>
|
|
<link id="TCustomCheckBox"/>
|
|
<link id="TCheckBox"/>
|
|
<link id="TButton"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TToggleBox.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
|
|
|
|
<element name="TToggleBox.GetControlClassDefaultSize" link="#lcl.controls.TControl.GetControlClassDefaultSize"/>
|
|
<element name="TToggleBox.GetControlClassDefaultSize.Result">
|
|
<short>Bounds used for new instances of the class.</short>
|
|
</element>
|
|
|
|
<element name="TToggleBox.CreateParams" link="#lcl.controls.TWinControl.CreateParams"/>
|
|
<element name="TToggleBox.CreateParams.Params">
|
|
<short>Creation parameters with style flags updated in the method.</short>
|
|
</element>
|
|
|
|
<element name="TToggleBox.ParentColor" link="#lcl.controls.TControl.ParentColor"/>
|
|
|
|
<element name="TToggleBox.Create">
|
|
<short>Constructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Create</var> is the overridden constructor for the class instance, and
|
|
calls the inherited method using <var>TheOwner</var> as the owner for the new
|
|
class instance. Create ensures that the internal component style for the
|
|
control is set to <var>csToggleBox</var>, and sets the default values for the
|
|
TabStop (<b>True</b>) and ParentColor (<b>False</b>) properties.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TToggleBox.Create.TheOwner">
|
|
<short>Owner of the class instance.</short>
|
|
</element>
|
|
|
|
<element name="TToggleBox.AllowGrayed" link="#lcl.stdctrls.TCustomCheckBox.AllowGrayed"/>
|
|
<element name="TToggleBox.Align" link="#lcl.controls.TControl.Align"/>
|
|
<element name="TToggleBox.Anchors" link="#lcl.controls.TControl.Anchors"/>
|
|
<element name="TToggleBox.AutoSize" link="#lcl.controls.TControl.AutoSize"/>
|
|
<element name="TToggleBox.BidiMode" link="#lcl.controls.TControl.BiDiMode"/>
|
|
<element name="TToggleBox.BorderSpacing" link="#lcl.controls.TControl.BorderSpacing"/>
|
|
<element name="TToggleBox.Caption" link="#lcl.controls.TControl.Caption"/>
|
|
<element name="TToggleBox.Checked" link="#lcl.stdctrls.TButtonControl.Checked"/>
|
|
<element name="TToggleBox.Color" link="#lcl.controls.TControl.Color"/>
|
|
<element name="TToggleBox.Constraints" link="#lcl.controls.TControl.Constraints"/>
|
|
<element name="TToggleBox.DoubleBuffered" link="#lcl.controls.TWinControl.DoubleBuffered"/>
|
|
<element name="TToggleBox.DragCursor" link="#lcl.controls.TControl.DragCursor"/>
|
|
<element name="TToggleBox.DragKind" link="#lcl.controls.TControl.DragKind"/>
|
|
<element name="TToggleBox.DragMode" link="#lcl.controls.TControl.DragMode"/>
|
|
<element name="TToggleBox.Enabled" link="#lcl.controls.TControl.Enabled"/>
|
|
<element name="TToggleBox.Font" link="#lcl.controls.TControl.Font"/>
|
|
<element name="TToggleBox.Hint" link="#lcl.controls.TControl.Hint"/>
|
|
<element name="TToggleBox.ParentBidiMode" link="#lcl.controls.TControl.ParentBiDiMode"/>
|
|
<element name="TToggleBox.ParentDoubleBuffered" link="#lcl.controls.TWinControl.ParentDoubleBuffered"/>
|
|
<element name="TToggleBox.ParentFont" link="#lcl.controls.TControl.ParentFont"/>
|
|
<element name="TToggleBox.ParentShowHint" link="#lcl.controls.TControl.ParentShowHint"/>
|
|
<element name="TToggleBox.PopupMenu" link="#lcl.controls.TControl.PopupMenu"/>
|
|
<element name="TToggleBox.ShowHint" link="#lcl.controls.TControl.ShowHint"/>
|
|
<element name="TToggleBox.State" link="#lcl.stdctrls.TCustomCheckBox.State"/>
|
|
<element name="TToggleBox.TabOrder" link="#lcl.controls.TWinControl.TabOrder"/>
|
|
|
|
<element name="TToggleBox.TabStop">
|
|
<short>Enables keyboard navigation using the Tab or Shift+Tab keys.</short>
|
|
<descr>
|
|
<p>
|
|
Allows the user to navigate to or from this control by pressing the Tab or
|
|
Shift+Tab keys. The default value for the property is <b>True</b> in
|
|
TToggleBox.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.TabStop">TWinControl.TabStop</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TToggleBox.Visible" link="#lcl.controls.TControl.Visible"/>
|
|
<element name="TToggleBox.OnChange" link="#lcl.stdctrls.TButtonControl.OnChange"/>
|
|
<element name="TToggleBox.OnClick" link="#lcl.controls.TControl.OnClick"/>
|
|
<element name="TToggleBox.OnContextPopup" link="#lcl.controls.TControl.OnContextPopup"/>
|
|
<element name="TToggleBox.OnDragDrop" link="#lcl.controls.TControl.OnDragDrop"/>
|
|
<element name="TToggleBox.OnDragOver" link="#lcl.controls.TControl.OnDragOver"/>
|
|
<element name="TToggleBox.OnEndDrag" link="#lcl.controls.TControl.OnEndDrag"/>
|
|
<element name="TToggleBox.OnEnter" link="#lcl.controls.TWinControl.OnEnter"/>
|
|
<element name="TToggleBox.OnExit" link="#lcl.controls.TWinControl.OnExit"/>
|
|
<element name="TToggleBox.OnMouseDown" link="#lcl.controls.TControl.OnMouseDown"/>
|
|
<element name="TToggleBox.OnMouseEnter" link="#lcl.controls.TControl.OnMouseEnter"/>
|
|
<element name="TToggleBox.OnMouseLeave" link="#lcl.controls.TControl.OnMouseLeave"/>
|
|
<element name="TToggleBox.OnMouseMove" link="#lcl.controls.TControl.OnMouseMove"/>
|
|
<element name="TToggleBox.OnMouseUp" link="#lcl.controls.TControl.OnMouseUp"/>
|
|
<element name="TToggleBox.OnMouseWheel" link="#lcl.controls.TControl.OnMouseWheel"/>
|
|
<element name="TToggleBox.OnMouseWheelDown" link="#lcl.controls.TControl.OnMouseWheelDown"/>
|
|
<element name="TToggleBox.OnMouseWheelUp" link="#lcl.controls.TControl.OnMouseWheelUp"/>
|
|
<element name="TToggleBox.OnResize" link="#lcl.controls.TControl.OnResize"/>
|
|
<element name="TToggleBox.OnStartDrag" link="#lcl.controls.TControl.OnStartDrag"/>
|
|
|
|
<element name="TRadioButton">
|
|
<short>Implement a radio button control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>TRadioButton</var> is a <var>TCustomCheckBox</var> descendant which
|
|
implements a selection button that works with other radio buttons in a
|
|
mutually exclusive way. If one radio button is selected, none of the others
|
|
in the group can be selected.
|
|
</p>
|
|
<p>
|
|
Ensure that the <var>OnClick</var> event handler for each button has a unique
|
|
<var>Action</var>, and that Actions for the other (deselected and therefore
|
|
inactive) buttons are turned off.
|
|
</p>
|
|
<p>
|
|
<var>TRadioGroup</var> behaves differently from a group of
|
|
<var>TRadioButton</var> controls placed on a form.
|
|
</p>
|
|
<p>
|
|
In the case of <var>TRadioButton</var>, the mutual exclusivity is a feature
|
|
that applies to any <var>RadioButton</var> anywhere in the Form, and the
|
|
<var>RadioButtons</var> can be rearranged in any order or placed anywhere
|
|
within the containing <var>Form</var>, while in <var>TRadioGroup</var> the
|
|
exclusivity applies only to buttons within the Group, which are ordered
|
|
strictly according to their <var>ItemIndex</var> within the <var>Items</var>
|
|
stringlist.
|
|
</p>
|
|
<p>
|
|
<var>TRadioButton</var> is an entity in itself, with a number of additional
|
|
properties, whereas the buttons within <var>TRadioGroup</var> are not
|
|
separate entities, but rather are simply entries in a list of strings, each
|
|
of which is associated with the on-screen image of a <var>RadioButton</var>.
|
|
</p>
|
|
<p>
|
|
The example shows the difference between the use of <var>TRadioButton</var>
|
|
and <var>TRadioGroup</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="HowToUseStdCtrls"/>
|
|
<link id="#lcl.extctrls.TRadioGroup">TRadioGroup</link>
|
|
</seealso>
|
|
<example file="extctrls/radiobutton.pas"/>
|
|
</element>
|
|
|
|
<element name="TRadioButton.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
|
|
|
|
<element name="TRadioButton.ApplyChanges">
|
|
<short>Updates the state for sibling radio buttons in the parent.</short>
|
|
<descr>
|
|
<p>
|
|
<var>ApplyChanges</var> is an overridden method in <var>TRadioButton</var>.
|
|
ApplyChanges ensures that other radio buttons in the <var>Parent</var>
|
|
control are unchecked when the current class instance is <var>Checked</var>.
|
|
</p>
|
|
<p>
|
|
The siblings controls are normally unchecked by methods in the widgetset
|
|
class. ApplyChanges performs the actions needed when a handle has not been
|
|
allocated for the control (widgetset class). This involves iterating over the
|
|
controls in Parent, and setting the Checked state for sibling TRadioButton
|
|
instances to <b>False</b>.
|
|
</p>
|
|
<p>
|
|
ApplyChanges is called when the value in the <var>State</var> property is
|
|
changed.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TRadioButton.Checked"/>
|
|
<link id="TCustomCheckBox.State"/>
|
|
<link id="TCustomCheckBox.ApplyChanges"/>
|
|
<link id="#lcl.controls.TControl.Parent">TControl.Parent</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TRadioButton.DialogChar">
|
|
<short>Implements support for an accelerator key in the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>DialogChar</var> is an overridden <var>Boolean</var> function in
|
|
<var>TRadioButton</var> which handles accelerator keys in messages for the
|
|
control. The return value is set to <b>True</b> when the radio button is
|
|
successfully toggled in the method.
|
|
</p>
|
|
<p>
|
|
<var>Message</var> is the TLMKey instance with the key code examined in the
|
|
method. When the key code matches the accelerator key in <var>Caption</var>,
|
|
the control is focused and the return value is set to <b>True</b>. If the
|
|
control cannot be focused, or Message does not represent an accelerator key
|
|
code, the inherited method is called to get the return value.
|
|
</p>
|
|
<p>
|
|
This method is called even if the control is disabled or hidden. Provided for
|
|
Delphi VCL compatibility.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.DialogChar"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TRadioButton.DialogChar.Result">
|
|
<short>
|
|
<b>True</b> when the message is handled and the control is focused.
|
|
</short>
|
|
</element>
|
|
<element name="TRadioButton.DialogChar.Message">
|
|
<short>Message examined for the accelerator key.</short>
|
|
</element>
|
|
|
|
<element name="TRadioButton.RealSetText">
|
|
<short>Sets the value for the text and/or caption in the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>RealSetText</var> is an overridden method used to set value for the
|
|
control using the <var>TCaption</var> instance in <var>Value</var>. In
|
|
TRadioButton, the method ensures that the value in the caption is updated and
|
|
that the control size is invalidated and adjusted using auto-sizing.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.RealSetText"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TRadioButton.RealSetText.Value">
|
|
<short>New value for the control.</short>
|
|
</element>
|
|
|
|
<element name="TRadioButton.DoClickOnChange">
|
|
<short>
|
|
Performs actions needed when the control has been changed using a mouse click.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>DoClickOnChange</var> is an overridden method used to signal an
|
|
<var>OnChange</var> event handler when the mouse is clicked on the control.
|
|
DoClickOnChange ensures the value in <var>TabStop</var> is updated to reflect
|
|
the <var>State</var> for the control. When State contains
|
|
<var>cbChecked</var>, TabStop is set to <b>True</b>. Otherwise, it is set to
|
|
<b>False</b>.
|
|
</p>
|
|
<p>
|
|
DoClickOnChange also ensures that the correct click/change behavior is used
|
|
for the current control State. If the control is Checked, the inherited
|
|
DoClickOnChange method is called. This also emulates the Delphi click
|
|
behavior where the <var>OnChange</var> event handler is signalled when
|
|
<var>ClicksDisabled</var> is <b>True</b>. When the control is not Checked,
|
|
the <var>DoOnChange</var> method is called to signal both the
|
|
<var>OnEditingDone</var> and <var>OnChange</var> event handlers.
|
|
</p>
|
|
<p>
|
|
DoClickOnChange is called from the <var>DoChange</var> method in the
|
|
<var>TCustomCheckBox</var> ancestor class.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.DoClickOnChange"/>
|
|
<link id="TButtonControl.DoOnChange"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TRadioButton.CreateParams">
|
|
<short>Initializes the creation parameters for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>CreateParams</var> is an overridden method used to update creation
|
|
parameters for the class instance, and calls the inherited method on entry.
|
|
CreateParams ensures that <var>Style</var> flags in the <var>Params</var>
|
|
argument are updated to include the <var>BS_RADIOBUTTON</var> style flag, and
|
|
to exclude the <var>BS_3STATE</var> style flag.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomCheckBox.CreateParams"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TRadioButton.CreateParams.Params">
|
|
<short>Creation parameters updated in the method.</short>
|
|
</element>
|
|
|
|
<element name="TRadioButton.Create">
|
|
<short>Constructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Create</var> is the overridden constructor for the class instance, and
|
|
calls the inherited constructor on entry. Create ensures that the
|
|
<var>csRadioButton</var> style flag is included in the component style flags
|
|
for the control. The default value for the <var>AutoSize</var> property is
|
|
set to <b>True</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TRadioButton.Create.TheOwner">
|
|
<short>Owner of the class instance.</short>
|
|
</element>
|
|
|
|
<element name="TRadioButton.Align" link="#lcl.controls.TControl.Align"/>
|
|
<element name="TRadioButton.Alignment" link="#lcl.stdctrls.TCustomCheckBox.Alignment"/>
|
|
<element name="TRadioButton.Anchors" link="#lcl.controls.TControl.Anchors"/>
|
|
|
|
<element name="TRadioButton.AutoSize">
|
|
<short>Enables or disables auto-sizing the control to its content.</short>
|
|
<descr>
|
|
<p>
|
|
The default value for the property is <b>True</b> in <var>TRadioButton</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.AutoSize">TControl.AutoSize</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TRadioButton.BidiMode" link="#lcl.controls.TControl.BiDiMode"/>
|
|
<element name="TRadioButton.BorderSpacing" link="#lcl.controls.TControl.BorderSpacing"/>
|
|
<element name="TRadioButton.Caption" link="#lcl.controls.TControl.Caption"/>
|
|
<element name="TRadioButton.Checked" link="#lcl.stdctrls.TButtonControl.Checked"/>
|
|
<element name="TRadioButton.Color" link="#lcl.controls.TControl.Color"/>
|
|
<element name="TRadioButton.Constraints" link="#lcl.controls.TControl.Constraints"/>
|
|
<element name="TRadioButton.DoubleBuffered" link="#lcl.controls.TWinControl.DoubleBuffered"/>
|
|
<element name="TRadioButton.DragCursor" link="#lcl.controls.TControl.DragCursor"/>
|
|
<element name="TRadioButton.DragKind" link="#lcl.controls.TControl.DragKind"/>
|
|
<element name="TRadioButton.DragMode" link="#lcl.controls.TControl.DragMode"/>
|
|
<element name="TRadioButton.Enabled" link="#lcl.controls.TControl.Enabled"/>
|
|
<element name="TRadioButton.Font" link="#lcl.controls.TControl.Font"/>
|
|
<element name="TRadioButton.Hint" link="#lcl.controls.TControl.Hint"/>
|
|
|
|
<element name="TRadioButton.ParentBidiMode" link="#lcl.controls.TControl.ParentBiDiMode"/>
|
|
<element name="TRadioButton.ParentColor" link="#lcl.controls.TControl.ParentColor"/>
|
|
<element name="TRadioButton.ParentDoubleBuffered" link="#lcl.controls.TWinControl.ParentDoubleBuffered"/>
|
|
<element name="TRadioButton.ParentFont" link="#lcl.controls.TControl.ParentFont"/>
|
|
<element name="TRadioButton.ParentShowHint" link="#lcl.controls.TControl.ParentShowHint"/>
|
|
<element name="TRadioButton.PopupMenu" link="#lcl.controls.TControl.PopupMenu"/>
|
|
<element name="TRadioButton.ShowHint" link="#lcl.controls.TControl.ShowHint"/>
|
|
<element name="TRadioButton.TabOrder" link="#lcl.controls.TWinControl.TabOrder"/>
|
|
|
|
<element name="TRadioButton.TabStop">
|
|
<short>Enables keyboard navigation using the Tab or Shift+Tab keys.</short>
|
|
<descr>
|
|
<p>
|
|
Allows the user to navigate to or from this control by pressing the Tab or
|
|
Shift+Tab keys. The default value for the property is <b>True</b> in
|
|
TRadioButton.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TWinControl.TabStop">TWinControl.TabStop</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TRadioButton.Visible" link="#lcl.controls.TControl.Visible"/>
|
|
<element name="TRadioButton.OnChange" link="#lcl.stdctrls.TButtonControl.OnChange"/>
|
|
<element name="TRadioButton.OnChangeBounds" link="#lcl.controls.TControl.OnChangeBounds"/>
|
|
<element name="TRadioButton.OnClick" link="#lcl.controls.TControl.OnClick"/>
|
|
<element name="TRadioButton.OnContextPopup" link="#lcl.controls.TControl.OnContextPopup"/>
|
|
<element name="TRadioButton.OnDragDrop" link="#lcl.controls.TControl.OnDragDrop"/>
|
|
<element name="TRadioButton.OnDragOver" link="#lcl.controls.TControl.OnDragOver"/>
|
|
<element name="TRadioButton.OnEndDrag" link="#lcl.controls.TControl.OnEndDrag"/>
|
|
<element name="TRadioButton.OnEnter" link="#lcl.controls.TWinControl.OnEnter"/>
|
|
<element name="TRadioButton.OnExit" link="#lcl.controls.TWinControl.OnExit"/>
|
|
<element name="TRadioButton.OnKeyDown" link="#lcl.controls.TWinControl.OnKeyDown"/>
|
|
<element name="TRadioButton.OnKeyPress" link="#lcl.controls.TWinControl.OnKeyPress"/>
|
|
<element name="TRadioButton.OnKeyUp" link="#lcl.controls.TWinControl.OnKeyUp"/>
|
|
<element name="TRadioButton.OnMouseDown" link="#lcl.controls.TControl.OnMouseDown"/>
|
|
<element name="TRadioButton.OnMouseEnter" link="#lcl.controls.TControl.OnMouseEnter"/>
|
|
<element name="TRadioButton.OnMouseLeave" link="#lcl.controls.TControl.OnMouseLeave"/>
|
|
<element name="TRadioButton.OnMouseMove" link="#lcl.controls.TControl.OnMouseMove"/>
|
|
<element name="TRadioButton.OnMouseUp" link="#lcl.controls.TControl.OnMouseUp"/>
|
|
<element name="TRadioButton.OnMouseWheel" link="#lcl.controls.TControl.OnMouseWheel"/>
|
|
<element name="TRadioButton.OnMouseWheelDown" link="#lcl.controls.TControl.OnMouseWheelDown"/>
|
|
<element name="TRadioButton.OnMouseWheelUp" link="#lcl.controls.TControl.OnMouseWheelUp"/>
|
|
<element name="TRadioButton.OnResize" link="#lcl.controls.TControl.OnResize"/>
|
|
<element name="TRadioButton.OnStartDrag" link="#lcl.controls.TControl.OnStartDrag"/>
|
|
|
|
<element name="TCustomLabel">
|
|
<short>
|
|
Control used to show static text optionally using multiple lines.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TCustomLabel</var> is a <var>TWinControl</var> descendant which
|
|
specifies a control to display static text on a form. The value in the
|
|
control is not editable visually, and can be used to label or describe
|
|
another control or a container on the form. Since it cannot be edited, it is
|
|
not allowed to receive the input focus. It can, however, be used to set focus
|
|
to an associated control using an accelerator key defined in the Caption for
|
|
the control.
|
|
</p>
|
|
<p>
|
|
TCustomLabel is the ancestor class for <var>TLabel</var>. Do not create
|
|
instances of TCustomLabel; use the TLabel descendant.
|
|
</p>
|
|
<p>
|
|
Use TStaticText to display static text and respond to keyboard input directly
|
|
in the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="HowToUseStdCtrls"/>
|
|
<link id="TLabel"/>
|
|
<link id="TStaticText"/>
|
|
<link id="#lcl.controls.TWinControl">TWinControl</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.FAlignment" link="#lcl.stdctrls.TCustomLabel.Alignment"/>
|
|
<element name="TCustomLabel.FFocusControl" link="#lcl.stdctrls.TCustomLabel.FocusControl"/>
|
|
<element name="TCustomLabel.FOptimalFill" link="#lcl.stdctrls.TCustomLabel.OptimalFill"/>
|
|
<element name="TCustomLabel.FShowAccelChar" link="#lcl.stdctrls.TCustomLabel.ShowAccelChar"/>
|
|
<element name="TCustomLabel.FWordWrap" link="#lcl.stdctrls.TCustomLabel.WordWrap"/>
|
|
<element name="TCustomLabel.FLayout" link="#lcl.stdctrls.TCustomLabel.Layout"/>
|
|
<element name="TCustomLabel.FInternalSetBounds"/>
|
|
|
|
<element name="TCustomLabel.SetAlignment">
|
|
<short>Sets the value for the Alignment property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomLabel.Alignment"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.SetAlignment.Value">
|
|
<short>New value for the Alignment property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.SetOptimalFill">
|
|
<short>Sets the value for the OptimalFill property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomLabel.OptimalFill"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.SetOptimalFill.AValue">
|
|
<short>New value for the OptimalFill property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
|
|
|
|
<element name="TCustomLabel.CanTab">
|
|
<short>Always <b>False</b>, since you cannot tab into a label control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>CanTab</var> is an overridden method in <var>TCustomLabel</var>. The
|
|
return value is always <b>False</b> since the <b>Tab</b> key cannot be used
|
|
to give focus to the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.CanTab">TControl.CanTab</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.CanTab.Result">
|
|
<short>Always <b>False</b> in TCustomLabel.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.DoDrawText">
|
|
<short>Performs actions needed to draw the text for the label.</short>
|
|
<descr>
|
|
<p>
|
|
<var>DoDrawText</var> performs action needed to draw the text for the label.
|
|
</p>
|
|
<p>
|
|
The <var>GetLabelText</var> method is called to get the text value drawn in
|
|
the method.
|
|
</p>
|
|
<p>
|
|
The <var>Font</var> color may be temporarily changed when when the
|
|
<var>Enabled</var> property is <b>False</b>. If themes are enabled, the Font
|
|
color is set to <var>clGrayText</var>. When themes are not enabled, the Font
|
|
color is set to <var>clBtnHighlight</var>. The original Font color is
|
|
restored prior to exiting the method.
|
|
</p>
|
|
<p>
|
|
DoDrawText calls the <var>DrawText</var> routine to draw the text on the
|
|
<var>Canvas</var> using the text rectangle and flags passed as arguments.
|
|
DrawText is called a second time to render the shadow for the label text when
|
|
themes are not enabled. The shadow text uses the color <var>clBtnShadow</var>.
|
|
</p>
|
|
<p>
|
|
DoDrawText is called from the <var>Paint</var> method.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomLabel.DoDrawText.Rect">
|
|
<short>Text rectangle used to draw the label text.</short>
|
|
</element>
|
|
<element name="TCustomLabel.DoDrawText.Flags">
|
|
<short>DrawText flags used to render the text.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.HasMultiLine">
|
|
<short>
|
|
Checks for CR or LF characters in the label text for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>HasMultiLine</var> is a <var>Boolean</var> function used to determine if
|
|
<b>CR</b> (Carriage Return, Decimal 13) or <b>LF</b> (LineFeed, Decimal 10)
|
|
characters are included in the text for the control. HasMultiLine calls
|
|
GetLabelText to get the text stored in the label.
|
|
</p>
|
|
<p>
|
|
The return value is <b>True</b> when either character occurs in the text for
|
|
the label.
|
|
</p>
|
|
<p>
|
|
HasMultiLine is used in the <var>CalculateSize</var> method to determine
|
|
whether the <var>DT_SINGLELINE</var> flag is included in the drawing flags
|
|
for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.CalculateSize"/>
|
|
<link id="TCustomLabel.GetLabelText"/>
|
|
<link id="#lcl.lcltype.DT_SINGLELINE">DT_SINGLELINE</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.HasMultiLine.Result">
|
|
<short>
|
|
<b>True</b> when CR or LF characters are used in the text for the label.
|
|
</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.CalculatePreferredSize">
|
|
<short>
|
|
Calculates the preferred size for the control using its anchoring and
|
|
constraints.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>CalculatePreferredSize</var> is an overridden method used to calculated
|
|
the preferred size for the control. Values stored in the <var>Anchors</var>,
|
|
<var>Constraints</var>, and <var>WordWrap</var> properties are used to
|
|
determine the effective width for the control. CalculateSize is called to
|
|
calculate the text rectangle for the control using the requested dimensions.
|
|
</p>
|
|
<p>
|
|
CalculatePreferredSize checks the assigned <var>Font</var> for the control to
|
|
determine whether text rotation is used in its <var>Orientation</var>
|
|
property. When a value other than <b>0</b> (<b>zero</b>) is used, the text
|
|
rectangle is rotated by the number of radians needed for the property value.
|
|
The values in <var>PreferredWidth</var> and <var>PreferredHeight</var> are
|
|
updated for the new text rectangle.
|
|
</p>
|
|
<p>
|
|
No actions are performed in the method if <var>Parent</var> has not been
|
|
assigned (contains <b>Nil</b>), or when a handle has not been allocated in
|
|
the Parent control.
|
|
</p>
|
|
<p>
|
|
Please note that CalculatePreferredSize does <b>not</b> call the inherited
|
|
method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.CalculatePreferredSize">TControl.CalculatePreferredSize</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.CalculatePreferredSize.PreferredWidth">
|
|
<short>Preferred width calculated for the control.</short>
|
|
</element>
|
|
<element name="TCustomLabel.CalculatePreferredSize.PreferredHeight">
|
|
<short>Preferred height calculated for the control.</short>
|
|
</element>
|
|
<element name="TCustomLabel.CalculatePreferredSize.WithThemeSpace">
|
|
<short><b>True</b> to reserve space for theme element details.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.CalculateSize">
|
|
<short>Gets the height and width needed for the label text.</short>
|
|
<descr>
|
|
<p>
|
|
Calculates the size for the label text using the formatting defined in
|
|
related property values.
|
|
</p>
|
|
<p>
|
|
<var>NeededWidth</var> and <var>NeededHeight</var> are variable parameters
|
|
updated in the method to reflect the values needed after applying DrawText
|
|
flags to the label text. The DrawText flags include constants which represent
|
|
the following properties:
|
|
</p>
|
|
<ul>
|
|
<li>WordWrap</li>
|
|
<li>HasMultiLine</li>
|
|
<li>ShowAccelChar</li>
|
|
<li>UseRightToLeftReading</li>
|
|
</ul>
|
|
<p>
|
|
The following constants are also used in the DrawText flags:
|
|
</p>
|
|
<ul>
|
|
<li>DT_CALCRECT</li>
|
|
<li>DT_EXPANDTABS</li>
|
|
<li>DT_NOCLIP</li>
|
|
</ul>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomLabel.CalculateSize.MaxWidth">
|
|
<short>Maximum width for the text rectangle in the label.</short>
|
|
</element>
|
|
<element name="TCustomLabel.CalculateSize.NeededWidth">
|
|
<short>Width needed for the text.</short>
|
|
</element>
|
|
<element name="TCustomLabel.CalculateSize.NeededHeight">
|
|
<short>Height needed for the text.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.DoAutoSize" link="#lcl.controls.TControl.DoAutoSize"/>
|
|
|
|
<element name="TCustomLabel.DialogChar" link="#lcl.controls.TControl.DialogChar">
|
|
<short>Handles an accelerator key for the control.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomLabel.DialogChar.Result">
|
|
<short><b>True</b> when the message is handled as an accelerator key.</short>
|
|
</element>
|
|
<element name="TCustomLabel.DialogChar.Message">
|
|
<short>Message examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.TextChanged">
|
|
<short>
|
|
Performs actions when the CM_TEXTCHANGED message is handled for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TextChanged</var> is an overridden method used to perform actions needed
|
|
when the <var>CM_TEXTCHANGED</var> message is handled for the control.
|
|
TextChanged calls <var>Invalidate</var> to request the control to be redrawn.
|
|
<var>UpdateSize</var> is called to perform auto-sizing, and recalculate the
|
|
dimensions for the control. The font may be re-sized when OptimalFill is
|
|
enabled.
|
|
</p>
|
|
<p>
|
|
TextChanged does <b>not</b> call the inherited method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.UpdateSize"/>
|
|
<link id="TCustomLabel.OptimalFill"/>
|
|
<link id="#lcl.controls.TControl.Invalidate">TControl.Invalidate</link>
|
|
<link id="#lcl.controls.TControl.TextChanged">TControl.TextChanged</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.DoSetBounds">
|
|
<short>Performs a bounds change for the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>DoSetBounds</var> is an overridden method in <var>TCustomLabel</var>. It
|
|
calls the inherited method to store the values in ALeft, ATop, AWidth, and
|
|
AHeight to the corresponding properties in the control. Values in
|
|
<var>OptimalFill</var>, <var>WordWrap</var>, and <var>Autosize</var> are used
|
|
to determine if additional actions are needed for the bounds change.
|
|
</p>
|
|
<p>
|
|
When <var>OptimalFill</var> is <b>True</b> and <var>AutoSize</var> is
|
|
<b>False</b>, the <var>AdjustFontForOptimalFill</var> method is called. If
|
|
<var>Width</var> was changed and <var>WordWrap</var> is <b>True</b>, both the
|
|
<var>InvalidatePreferredSize</var> and <var>AdjustSize</var> methods are
|
|
called.
|
|
</p>
|
|
<p>
|
|
DoSetBounds is called from the <var>ChangeBounds</var> method in an ancestor
|
|
class.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.OptimalFill"/>
|
|
<link id="TCustomLabel.AutoSize"/>
|
|
<link id="TCustomLabel.WordWrap"/>
|
|
<link id="TCustomLabel.AdjustFontForOptimalFill"/>
|
|
<link id="#lcl.controls.TControl.DoSetBounds">TControl.DoSetBounds</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.DoSetBounds.ALeft">
|
|
<short>New value for the Left property.</short>
|
|
</element>
|
|
<element name="TCustomLabel.DoSetBounds.ATop">
|
|
<short>New value for the Top property.</short>
|
|
</element>
|
|
<element name="TCustomLabel.DoSetBounds.AWidth">
|
|
<short>New value for the Width property.</short>
|
|
</element>
|
|
<element name="TCustomLabel.DoSetBounds.AHeight">
|
|
<short>New value for the Height property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.FontChanged">
|
|
<short>
|
|
Implements the OnChange event handler for the Font in the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>FontChanged</var> is an overridden method in <var>TCustomLabel</var>
|
|
which implements the <var>OnChange</var> event handler for the
|
|
<var>Font</var> in the control. FontChanged calls the inherited method on
|
|
entry, and calls <var>UpdateSize</var> to resize the control for any changes
|
|
to font properties.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.UpdateSize"/>
|
|
<link id="#lcl.controls.TControl.FontChanged">TControl.FontChanged</link>
|
|
<link id="#lcl.graphics.TFont">TFont</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.FontChanged.Sender">
|
|
<short>Object for the event notification.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.GetControlClassDefaultSize">
|
|
<short>Gets the size used for new instances of the class.</short>
|
|
<descr>
|
|
<p>
|
|
<var>GetControlClassDefaultSize</var> is an overridden <var>TSize</var> class
|
|
function used to get the height and width for new instances of the control.
|
|
GetControlClassDefaultSize uses 65 pixels for the width, and 17 pixels for
|
|
the height.
|
|
</p>
|
|
<p>
|
|
The return value is the TSize instance where the values are stored; the
|
|
<var>CX</var> member is used for the width and the <var>CY</var> member is
|
|
used for the height.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.GetControlClassDefaultSize">TControl.GetControlClassDefaultSize</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.GetControlClassDefaultSize.Result">
|
|
<short>Size used for new instances of the class.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.WMActivate">
|
|
<short>Defers the focus to the control in the FocusControl property.</short>
|
|
<descr>
|
|
<p>
|
|
<var>WMActivate</var> is a procedure used to handle <b>LM_ACTIVATE</b>
|
|
messages for the control.
|
|
</p>
|
|
<p>
|
|
WMActivate ensures that the control in the <var>FocusControl</var> property
|
|
receives the input focus by calling its <var>SetFocus</var> method. No
|
|
actions are performed in the method when FocusControl has not been assigned
|
|
(contains <b>Nil</b>) or its <var>CanFocus</var> method returns <b>False</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.FocusControl"/>
|
|
<link id="#lcl.controls.TWinControl.CanFocus">TWinControl.CanFocus</link>
|
|
<link id="#lcl.controls.TWinControl.SetFocus">TWinControl.SetFocus</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.WMActivate.Message">
|
|
<short>Message examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.Notification">
|
|
<short>
|
|
Handles a notification that a component used in the control has been added or
|
|
removed.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Notification</var> is an overridden method in <var>TCustomLabel</var>,
|
|
and calls the inherited method on entry. Notification ensures that
|
|
<var>FocusControl</var> is set to <b>Nil</b> when it is the component for the
|
|
<var>opRemove</var> <var>Operation</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.Notification">TControl.Notification</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.Notification.AComponent">
|
|
<short>Component for the notification.</short>
|
|
</element>
|
|
<element name="TCustomLabel.Notification.Operation">
|
|
<short>Operation for the notification.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.GetLabelText">
|
|
<short>Returns the string value in the Caption for the control.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="#lcl.controls.TControl.Caption">TControl.Caption</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.GetLabelText.Result">
|
|
<short>Text displayed in the control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.GetTransparent">
|
|
<short>Gets the value for the Transparent property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomLabel.Transparent"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.GetTransparent.Result">
|
|
<short>Value for the Transparent property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.SetFocusControl">
|
|
<short>Sets the value for the FocusControl property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomLabel.FocusControl"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.SetFocusControl.Value">
|
|
<short>New value for the FocusControl property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.SetLayout">
|
|
<short>Sets the value for the Layout property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomLabel.Layout"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.SetLayout.Value">
|
|
<short>New value for the Layout property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.SetShowAccelChar">
|
|
<short>Sets the value for the ShowAccelChar property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomLabel.ShowAccelChar"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.SetShowAccelChar.Value">
|
|
<short>New value for the ShowAccelChar property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.SetTransparent">
|
|
<short>Sets the value for the Transparent property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomLabel.Transparent"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.SetTransparent.NewTransparent">
|
|
<short>New value for the Transparent property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.SetWordWrap">
|
|
<short>Sets the value for the WordWrap property.</short>
|
|
<descr/>
|
|
<seealso>
|
|
<link id="TCustomLabel.WordWrap"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.SetWordWrap.Value">
|
|
<short>New value for the WordWrap property.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.Loaded">
|
|
<short>
|
|
Performs actions when the component has been loaded using LCL component
|
|
streaming.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Loaded</var> is overridden in <var>TCustomLabel</var>, and calls the
|
|
inherited method on Entry. Loaded calls the <var>AdjustSize</var> method to
|
|
handle delayed calls to <var>AutoSize</var> during component streaming.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.AutoSize"/>
|
|
<link id="#lcl.controls.TControl.Loaded">TControl.Loaded</link>
|
|
<link id="#lcl.controls.TControl.AdjustSize">TControl.AdjustSize</link>
|
|
<link id="#lcl.controls.TControl.AutoSizeDelayed">TControl.AutoSizeDelayed</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.UpdateSize">
|
|
<short>
|
|
Adjusts the size for the control based on settings in AutoSize and
|
|
OptimalFill.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>UpdateSize</var> is a method used to adjust the size for the control
|
|
based on settings in the <var>AutoSize</var> and <var>OptimalFill</var>
|
|
properties. UpdateSize calls <var>InvalidatePreferredSize</var>.
|
|
</p>
|
|
<p>
|
|
When <var>OptimalFill</var> is <b>True</b> and <var>AutoSize</var> is
|
|
<b>False</b>, the <var>AdjustFontForOptimalFill</var> method is called to
|
|
adjust the font size used in the control. <var>AdjustSize</var> is called to
|
|
resize the control (and any parent controls). When <var>Alignment</var> is
|
|
set to <var>taRightJustify</var>, the value in <var>Left</var> may be changed
|
|
to reflect the new <var>Width</var> for the control.
|
|
</p>
|
|
<p>
|
|
UpdateSize is called from the implementation of the <var>FontChanged</var>
|
|
and <var>TextChanged</var> methods, and when setting a new value for the
|
|
<var>ShowAccelChar</var> or <var>WordWrap</var> properties.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.Alignment">
|
|
<short>
|
|
Horizontal text justification in the control (centered, left- or
|
|
right-justified).
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Alignment</var> is a <var>TAlignment</var> property which controls the
|
|
horizontal justification of the text displayed in the control. The default
|
|
value for the property is <var>taLeftJustify</var>. When a new value is
|
|
assigned to the Alignment property, the <var>Invalidate</var> method is
|
|
called to repaint the control.
|
|
</p>
|
|
<p>
|
|
Alignment (and other properties) are used in the <var>Paint</var> method when
|
|
the text is rendered to the <var>Canvas</var> for the control. It is also
|
|
used in <var>UpdateSize</var> when right alignment needs to be considered for
|
|
an auto-sized or optimal-filled control.
|
|
</p>
|
|
<p>
|
|
Use the <var>Layout</var> property to control the vertical alignment of the
|
|
text displayed in the control.
|
|
</p>
|
|
<p>
|
|
Use <var>OptimalFill</var> to indicate if the font height can be adjusted to
|
|
fill the client area for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.AutoSize"/>
|
|
<link id="TCustomLabel.Layout"/>
|
|
<link id="TCustomLabel.OptimalFill"/>
|
|
<link id="TCustomLabel.Paint"/>
|
|
<link id="TCustomLabel.UpdateSize"/>
|
|
<link id="#lcl.controls.TControl.Invalidate">TControl.Invalidate</link>
|
|
<link id="#rtl.classes.TAlignment">TAlignment</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.FocusControl">
|
|
<short>
|
|
The control associated with the label and its accelerator key (AccelChar).
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
Set <var>FocusControl</var> to the control which is focused when the
|
|
accelerator key in the label is pressed.
|
|
</p>
|
|
<p>
|
|
A label control cannot receive the input focus (it is read-only), but can
|
|
display an accelerator key indicator, just like a menu entries. A windowed
|
|
control (Edit...) can receive focus, but cannot indicate an accelerator key.
|
|
</p>
|
|
<p>
|
|
Using a combination of a label and another control allows setting the
|
|
accelerator key in the label caption. The other control receives focus when
|
|
the user presses the accelerator key.
|
|
</p>
|
|
<p>
|
|
An accelerator key is marked by an Ampersand '&' in the label caption,
|
|
immediately preceding the character to be used as the accelerator key. The
|
|
marked character appears underlined on screen, when ShowAccelChar is set to
|
|
<b>True</b>.
|
|
</p>
|
|
<p>
|
|
For example: When you have a NameEdit1 control on a form, preceded by a label
|
|
NameLabel1, you can set NameLabel1.FocusControl to NameEdit1, and
|
|
NameLabel1.Caption to '&Name'.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.ShowAccelChar"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.Layout">
|
|
<short>
|
|
Vertical alignment for control text (at the top, bottom, or center).
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Layout</var> is a <var>TTextLayout</var> property with the vertical
|
|
alignment used for the text displayed in the control. The default value for
|
|
the property is <var>tlTop</var>. Changing the value in Layout causes the
|
|
<var>Invalidate</var> method to be called to redraw the control.
|
|
</p>
|
|
<p>
|
|
Use the <var>Alignment</var> property to control the horizontal alignment for
|
|
the text in the control.
|
|
</p>
|
|
<p>
|
|
Use <var>OptimalFill</var> to indicate if the font height can be adjusted to
|
|
fill the client area for the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.Alignment"/>
|
|
<link id="TCustomLabel.OptimalFill"/>
|
|
<link id="#lcl.graphics.TTextLayout">TTextLayout</link>
|
|
<link id="#lcl.controls.TControl.Invalidate">TControl.Invalidate</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.ShowAccelChar">
|
|
<short>
|
|
Underlines the character in the label that acts as the accelerator or short
|
|
cut key.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
When <b>False</b>, an <b>Ampersand (&)</b> character in the label caption
|
|
is displayed as an ordinary character (as used in the Object Inspector).
|
|
</p>
|
|
<p>
|
|
When <b>True</b>, the character following the <b>Ampersand</b> is drawn with
|
|
an underline. When the user presses the accelerator key, input focus is given
|
|
to the associated <var>FocusControl</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.FocusControl"/>
|
|
<link id="#lcl.controls.TControl.Caption">TControl.Caption</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.Transparent">
|
|
<short>Indicates whether the viewer can see through the control.</short>
|
|
<descr>
|
|
<p>
|
|
When Transparent is set to <b>False</b>, the enclosing rectangle for the
|
|
control is filled with the background Color for the label. When set to
|
|
<b>True</b>, Color is not used to fill the background for the control and the
|
|
underlying control is visible.
|
|
</p>
|
|
<p>
|
|
The property value is <b>True</b> when csOpaque has not been included in the
|
|
style flags for the control. Changing the value for the property causes
|
|
<var>ControlStyle</var> to be updated. When set to <b>True</b>, csOpaque is
|
|
removed from ControlStyle. When set to <b>False</b>, csOpaque is included in
|
|
ControlStyle. The control is redrawn when a new value is assigned to the
|
|
property.
|
|
</p>
|
|
<p>
|
|
The default value for Transparent in the LCL is <b>True</b>. This differs
|
|
from the default value in the Delphi VCL.
|
|
</p>
|
|
<p>
|
|
Values in Transparent and Color are used in the Paint method when the
|
|
background and text for the control are drawn. When Transparent is
|
|
<b>False</b> and Color has a value other than clNone, a solid brush is used
|
|
to fill the display area with the value in Color.
|
|
</p>
|
|
</descr>
|
|
<version>
|
|
Modified in LCL version 3.0. Transparent is no longer toggled when Color is
|
|
changed. Its value is independent of Color.
|
|
</version>
|
|
<seealso>
|
|
<link id="TCustomLabel.Color"/>
|
|
<link id="TCustomLabel.Paint"/>
|
|
<link id="#lcl.controls.TControl.ControlStyle">TControl.ControlStyle</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.WordWrap">
|
|
<short>
|
|
Allows the caption to wrap to multiple lines when it is longer than the
|
|
available Width.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>WordWrap</var> is a <var>Boolean</var> property which indicates if the
|
|
caption in the control can be wrapped to multiple lines when its length
|
|
exceeds the value in <var>Width</var>. The default value for the property is
|
|
<b>False</b>.
|
|
</p>
|
|
<p>
|
|
When a new value is assigned to the property, the <var>Invalidate</var> and
|
|
<var>UpdateSize</var> methods are called to auto-size and repaint the control.
|
|
</p>
|
|
<p>
|
|
When WordWrap is <b>False</b>, the text is truncated at the right boundary
|
|
when it is too long for the control Width. When WordWrap is <b>True</b> and
|
|
<var>AutoSize</var> is <b>True</b>, the maximum <var>Width</var> is
|
|
determined by anchoring the left and right sides for the control to its
|
|
Parent.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.AutoSize"/>
|
|
<link id="TCustomLabel.UpdateSize"/>
|
|
<link id="#lcl.controls.TControl.Width">TControl.Width</link>
|
|
<link id="#lcl.controls.TControl.Invalidate">TControl.Invalidate</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.OptimalFill">
|
|
<short>
|
|
If <b>True</b>, the font size is adjusted for optimal fill of the available
|
|
space.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>OptimalFill</var> is a <var>Boolean</var> property which indicates that
|
|
the <var>Font</var> height should be maximized to fill the available width in
|
|
the control. The default value for the property is <b>False</b>.
|
|
</p>
|
|
<p>
|
|
Setting OptimalFill to <b>True</b> causes <var>AutoSize</var> to be set to
|
|
<b>False</b>. The <var>AdjustFontForOptimalFill</var> method is called to get
|
|
and apply the maximum font height allowed for the <var>Width</var> and
|
|
<var>Height</var> in the control.
|
|
</p>
|
|
<p>
|
|
Changing the value for the property causes <var>Invalidate</var> to be called
|
|
to redraw the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.AutoSize"/>
|
|
<link id="TCustomLabel.AdjustFontForOptimalFill"/>
|
|
<link id="#lcl.controls.TControl.Width">TControl.Width</link>
|
|
<link id="#lcl.controls.TControl.Height">TControl.Height</link>
|
|
<link id="#lcl.controls.TControl.Font">TControl.Font</link>
|
|
<link id="#lcl.controls.TControl.Invalidate">TControl.Invalidate</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.Create">
|
|
<short>Constructor for the class instance.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Create</var> is the overridden constructor for the class instance, and
|
|
calls the inherited constructor on entry to the method.
|
|
</p>
|
|
<p>
|
|
Create updates the values in <var>ControlStyle</var> to enable mouse capture
|
|
and both click and double-click events. Create calls
|
|
<var>SetInitialBounds</var> using the default dimensions for the class
|
|
instance. Create sets the default values for properties, including:
|
|
<var>ShowAccelChar</var>, <var>Color</var>, <var>AutoSize</var>, and
|
|
<var>AccessibleRole</var>.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomLabel.Create.TheOwner">
|
|
<short>Owner of the class instance.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.CalcFittingFontHeight">
|
|
<short>
|
|
Calculates the font height needed to fill the specified width and height
|
|
constraints.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>CalcFittingFontHeight</var> is a <var>Boolean</var> function used to
|
|
calculate the maximum font height needed to make the specified string fill
|
|
the available space, given the MaxWidth and MaxHeight constraints.
|
|
</p>
|
|
<p>
|
|
The return value is <b>True</b> when the text rectangle using the new font
|
|
height fits within the size constraints in MaxWidth and MaxHeight. NeedWidth
|
|
and NeedHeight are set to the values indicated in the text rectangle. The
|
|
return value is <b>False</b> when the text rectangle is either too wide or
|
|
too tall, or cannot be calculated using the specified parameter values.
|
|
</p>
|
|
<p>
|
|
No actions are performed in the method when AutoSizeDelayed is set to
|
|
<b>True</b>, when TheText is an empty string, or when MaxHeight or MaxWidth
|
|
contain 0 or a negative value.
|
|
</p>
|
|
<p>
|
|
The font height is calculated using a temporary TFont instance with the
|
|
current Font for the control, setting its drawing flags to calculate the text
|
|
rectangle. The drawing flags include wrapping when the WordWrap property is
|
|
set to <b>True</b>. The font height is incrementally increased or decreased
|
|
until the maximum font height which fits with MaxHeight and MaxWidth is
|
|
determined.
|
|
</p>
|
|
<p>
|
|
CalcFittingFontHeight is used in the implementation of the
|
|
<var>AdjustFontForOptimalFill</var> method.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TCustomLabel.CalcFittingFontHeight.Result">
|
|
<short>
|
|
<b>True</b> when the text fits within the size constraints in MaxWidth and
|
|
MaxHeight.
|
|
</short>
|
|
</element>
|
|
<element name="TCustomLabel.CalcFittingFontHeight.TheText">
|
|
<short>Text measured in the method.</short>
|
|
</element>
|
|
<element name="TCustomLabel.CalcFittingFontHeight.MaxWidth">
|
|
<short>Width constraint for the text rectangle.</short>
|
|
</element>
|
|
<element name="TCustomLabel.CalcFittingFontHeight.MaxHeight">
|
|
<short>Height constraint for the text rectangle.</short>
|
|
</element>
|
|
<element name="TCustomLabel.CalcFittingFontHeight.FontHeight">
|
|
<short>Font height calculated in the method.</short>
|
|
</element>
|
|
<element name="TCustomLabel.CalcFittingFontHeight.NeededWidth">
|
|
<short>Width needed for the text using the calculated font size.</short>
|
|
</element>
|
|
<element name="TCustomLabel.CalcFittingFontHeight.NeededHeight">
|
|
<short>Height needed for the text using the calculated font size.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.AdjustFontForOptimalFill">
|
|
<short>
|
|
Adjusts the font height for the control text to fill the available client
|
|
area.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>AdjustFontForOptimalFill</var> is a <var>Boolean</var> 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
|
|
<var>CalcFittingFontHeight</var> 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 <var>Font</var> property.
|
|
</p>
|
|
<p>
|
|
The return value is <b>True</b> when the Font height was changed in the
|
|
method.
|
|
</p>
|
|
<p>
|
|
AdjustFontForOptimalFill is called from <var>DoSetBounds</var> and
|
|
<var>UpdateSize</var> when <var>OptimalFill</var> is set to <b>True</b> and
|
|
<var>AutoSize</var> is set to <b>False</b>. It is also called when a new
|
|
value is assigned to the <var>OptimalFill</var> property.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.CalcFittingFontHeight"/>
|
|
<link id="TCustomLabel.OptimalFill"/>
|
|
<link id="TCustomLabel.AutoSize"/>
|
|
<link id="TCustomLabel.UpdateSize"/>
|
|
<link id="TCustomLabel.DoSetBounds"/>
|
|
<link id="#lcl.controls.TControl.Font">TControl.Font</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.AdjustFontForOptimalFill.Result">
|
|
<short><b>True</b> when the font height was changed in the method.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.Paint">
|
|
<short>Performs actions needed to draw the control on its Canvas.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Paint</var> is an overridden method in <var>TCustomLabel</var> used to
|
|
draw the control on its <var>Canvas</var>. Paint ensures that property values
|
|
in the control are applied to the Canvas before measuring and drawing its
|
|
Text, including:
|
|
</p>
|
|
<ul>
|
|
<li>AutoSize</li>
|
|
<li>Alignment</li>
|
|
<li>Layout</li>
|
|
<li>WordWrap</li>
|
|
<li>Transparent</li>
|
|
<li>Color</li>
|
|
<li>Font</li>
|
|
<li>ShowAccel</li>
|
|
<li>Enabled</li>
|
|
<li>Alignment</li>
|
|
<li>UseRightToLeftAlignment</li>
|
|
<li>UseRightToLeftReading</li>
|
|
</ul>
|
|
<p>
|
|
DoDrawText is called to render the label text using the DrawText flags needed
|
|
for the property values.
|
|
</p>
|
|
<remark>
|
|
Paint does <b>not</b> call the inherited method in
|
|
<var>TGraphicControl</var>. As a result, it does not signal the
|
|
<var>OnPaint</var> event handler in the ancestor class.
|
|
</remark>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.GetLabelText"/>
|
|
<link id="#lcl.controls.TControl.Caption">TControl.Caption</link>
|
|
<link id="#lcl.controls.TGraphicControl.Canvas">TGraphicControl.Canvas</link>
|
|
<link id="#lcl.controls.TGraphicControl.Paint">TGraphicControl.Paint</link>
|
|
<link id="#lcl.controls.TGraphicControl.OnPaint">TGraphicControl.OnPaint</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.SetBounds">
|
|
<short>Sets the bounds (Top, Left, Width, Height) for the control.</short>
|
|
<descr>
|
|
<p>
|
|
Overridden to call <var>InvalidatePreferredSize</var> the first time the
|
|
method is used and both <var>AutoSize</var> and <var>WordWrap</var> are
|
|
enabled in the control. Calls the inherited method prior to exit.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.AutoSize"/>
|
|
<link id="TCustomLabel.WordWrap"/>
|
|
<link id="#lcl.controls.TControl.InvalidatePreferredSize">TControl.InvalidatePreferredSize</link>
|
|
<link id="#lcl.controls.TControl.SetBounds">TControl.SetBounds</link>
|
|
</seealso>
|
|
</element>
|
|
<element name="TCustomLabel.SetBounds.aLeft">
|
|
<short>Horizontal coordinate for the left-hand edge of the control.</short>
|
|
</element>
|
|
<element name="TCustomLabel.SetBounds.aTop">
|
|
<short>Vertical coordinate for the top edge of the control.</short>
|
|
</element>
|
|
<element name="TCustomLabel.SetBounds.aWidth">
|
|
<short>New width for the control.</short>
|
|
</element>
|
|
<element name="TCustomLabel.SetBounds.aHeight">
|
|
<short>New Height for the control.</short>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.AutoSize">
|
|
<short>
|
|
Enables or disables auto-sizing the control to its content.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
AutoSize is a Boolean property reintroduced in TCustomLabel to set its default
|
|
value to <b>True</b>.
|
|
</p>
|
|
<p>
|
|
Auto-sizing behavior in <var>TCustomLabel</var> differs from the
|
|
implementation in the ancestor class (TControl). For example, a label can
|
|
become bigger or smaller to accommodate a longer or shorter caption. In other
|
|
controls, the property may control only the height for the control based on
|
|
the Font size.
|
|
</p>
|
|
<p>
|
|
AutoSize causes the control to be resized to fit the content in the Caption
|
|
property. This can include changing the values in Top, Left, Width, or Height
|
|
if the corresponding edge(s) are not fixed using the Anchors property. Any
|
|
edge included in Anchors is not altered when the control is auto-sized.
|
|
</p>
|
|
<p>
|
|
In addition to Anchors, auto-sizing behavior is also influenced by the
|
|
Alignment and WordWrap properties for the control. When Alignment is set to
|
|
taLeftJust or taRightJustify, and AutoSize is not enabled, the control
|
|
displays the caption value aligned to the edge specified in Alignment. Excess
|
|
characters which do not fit in the Width for the control are truncated.
|
|
</p>
|
|
<p>
|
|
When AutoSize is enabled, the control is resized to fit the characters in
|
|
Caption by repositioning the opposite edge for the Alignment value. For
|
|
taLeftJustify, the right edge is expanded or contracted by changing the value
|
|
in Width. For taRightJustify, the value in Left is repositioned until all
|
|
characters are displayed using the Alignment.
|
|
</p>
|
|
<p>
|
|
Use the Anchors property to fix the position for an edge during auto-sizing
|
|
regardless of the value in the Alignment property. For example, when Anchors
|
|
is set to [akTop, akLeft, akRight], only the height for the control can be
|
|
altered when AutoSize is enabled.
|
|
</p>
|
|
<p>
|
|
When WordWrap is enabled, and both the left and right edges are included in
|
|
Anchors, the height for the label control is adjusted during auto-sizing.
|
|
</p>
|
|
<p>
|
|
Simultaneous use of both AutoSize and OptimalFill can have conflicting
|
|
results. AutoSize tries to use the existing Font to determine the control width
|
|
/height. OptimalFill adjusts the Font size to fill the control width/height.
|
|
</p>
|
|
<p>
|
|
Changing the value for the property causes AdjustSize (in TControl) to be
|
|
called when the property is enabled.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomLabel.Alignment"/>
|
|
<link id="TCustomLabel.Layout"/>
|
|
<link id="TCustomLabel.WordWrap"/>
|
|
<link id="TCustomLabel.OptimalFill"/>
|
|
<link id="TCustomLabel.CalculateSize"/>
|
|
<link id="TCustomLabel.CalculatePreferredSize"/>
|
|
<link id="#lcl.controls.TControl.Caption">TControl.Caption</link>
|
|
<link id="#lcl.controls.TControl.Anchors">TControl.Anchors</link>
|
|
<link id="#lcl.controls.TControl.AutoSize">TControl.AutoSize</link>
|
|
<link id="#lcl.controls.TControl.AdjustSize">TControl.AdjustSize</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TCustomLabel.Color">
|
|
<short>Contains the color used for the background on the control.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Color</var> is <var>TColor</var> property with the background color for
|
|
the control.
|
|
</p>
|
|
<p>
|
|
Setting a new value for the property causes the value in ParentColor to be
|
|
set to <b>False</b>. A CM_COLORCHANGED control message is performed, and the
|
|
control is redrawn.
|
|
</p>
|
|
<p>
|
|
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 <b>False</b> 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.
|
|
</p>
|
|
<remark>
|
|
By default, label controls are transparent in the LCL. This differs from the
|
|
Delphi VCL where the default value for Transparent is <b>False</b>.
|
|
</remark>
|
|
<p>
|
|
Set Transparent to <b>False</b> to make the label opaque.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<version>
|
|
Modified in LCL version 3.0 to unbind Color and Transparent properties.
|
|
Setting Color does not automatically change Transparent from <b>True</b> to
|
|
<b>False</b> now.
|
|
</version>
|
|
<link id="TCustomLabel.Paint"/>
|
|
<link id="TCustomLabel.Transparent"/>
|
|
<link id="#lcl.controls.TControl.Color">TControl.Color</link>
|
|
<link id="#lcl.controls.TControl.Font">TControl.Font</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TLabel">
|
|
<short>
|
|
Control used to display static text, possibly in multiple lines.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TLabel</var> is a <var>TCustomLabel</var> descendant which implements a
|
|
control to display static text on a form. The value in the control is not
|
|
editable visually, and can be used to label or describe another control on
|
|
the form or a container. Since it cannot be edited, it is not allowed to
|
|
receive the input focus. It can, however, be used to set focus to an
|
|
associated control using an accelerator key defined in the Caption for the
|
|
control.
|
|
</p>
|
|
<p>
|
|
Use <var>TStaticText</var> to display static text and respond to keyboard
|
|
input directly in the control.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="HowToUseStdCtrls"/>
|
|
<link id="TStaticText"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TLabel.Align" link="#lcl.controls.TControl.Align"/>
|
|
<element name="TLabel.Alignment" link="#lcl.stdctrls.TCustomLabel.Alignment"/>
|
|
<element name="TLabel.Anchors" link="#lcl.controls.TControl.Anchors"/>
|
|
<element name="TLabel.AutoSize" link="#lcl.stdctrls.TCustomLabel.AutoSize"/>
|
|
<element name="TLabel.BidiMode" link="#lcl.controls.TControl.BiDiMode"/>
|
|
<element name="TLabel.BorderSpacing" link="#lcl.controls.TControl.BorderSpacing"/>
|
|
|
|
<element name="TLabel.Caption">
|
|
<short>
|
|
The text displayed for the control.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Caption</var> is a <var>TCaption</var> property with the text displayed
|
|
for the control. By default, Caption has the same value as the Name property
|
|
used for the control. An explicit value can be assigned at design-time using
|
|
the Object Inspector, or by the developer in program code.
|
|
</p>
|
|
<p>
|
|
Caption can be used to display an accelerator (or shortcut) key which allows
|
|
an associated control to be given focus or executed. The shortcut key is
|
|
identified by placing an Ampersand (&) character in front of the character
|
|
used as the accelerator key. Use two Ampersand characters to display a single
|
|
Ampersand which is not a shortcut key.
|
|
</p>
|
|
<p>
|
|
Set ShowAccelChar to <b>False</b> to disable display and use of the
|
|
accelerator key in the control. This also allows Caption to display an
|
|
Ampersand (&) character without escaping its value.
|
|
</p>
|
|
<p>
|
|
Use FocusControl to specify the control which is focused/activated when the
|
|
accelerator key is detected and ShowAccelerator is enabled.
|
|
</p>
|
|
<p>
|
|
Set values in Font to specify the typeface, size, color, and style used to
|
|
display the Caption text. Use Color to set the background color for the
|
|
control.
|
|
</p>
|
|
<p>
|
|
For example:
|
|
</p>
|
|
<code>
|
|
{
|
|
var
|
|
ALabel: TLabel;
|
|
Form1: TForm;
|
|
Memo1: TMemo;
|
|
}
|
|
|
|
ALabel.ShowAccelerator := True;
|
|
ALabel.FocusControl := Memo1;
|
|
ALabel.Caption := '&Notes && Comments';
|
|
</code>
|
|
<p>
|
|
Displays the 'N' character with an underline indicating the accelerator key.
|
|
Pressing Alt+N activates the shortcut key and causes the associated TMemo
|
|
control to be given focus.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TLabel.ShowAccelChar"/>
|
|
<link id="TLabel.FocusControl"/>
|
|
<link id="TLabel.Color"/>
|
|
<link id="TLabel.Font"/>
|
|
<link id="TLabel.Layout"/>
|
|
<link id="#lcl.controls.TControl.Caption">TControl.Caption</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TLabel.Color" link="#lcl.stdctrls.TCustomLabel.Color"/>
|
|
<element name="TLabel.Constraints" link="#lcl.controls.TControl.Constraints"/>
|
|
<element name="TLabel.DragCursor" link="#lcl.controls.TControl.DragCursor"/>
|
|
<element name="TLabel.DragKind" link="#lcl.controls.TControl.DragKind"/>
|
|
<element name="TLabel.DragMode" link="#lcl.controls.TControl.DragMode"/>
|
|
<element name="TLabel.Enabled" link="#lcl.controls.TControl.Enabled"/>
|
|
<element name="TLabel.FocusControl" link="#lcl.stdctrls.TCustomLabel.FocusControl"/>
|
|
<element name="TLabel.Font" link="#lcl.controls.TControl.Font"/>
|
|
<element name="TLabel.Layout" link="#lcl.stdctrls.TCustomLabel.Layout"/>
|
|
<element name="TLabel.OptimalFill" link="#lcl.stdctrls.TCustomLabel.OptimalFill"/>
|
|
<element name="TLabel.ParentBidiMode" link="#lcl.controls.TControl.ParentBiDiMode"/>
|
|
<element name="TLabel.ParentColor" link="#lcl.controls.TControl.ParentColor"/>
|
|
<element name="TLabel.ParentFont" link="#lcl.controls.TControl.ParentFont"/>
|
|
<element name="TLabel.ParentShowHint" link="#lcl.controls.TControl.ParentShowHint"/>
|
|
<element name="TLabel.PopupMenu" link="#lcl.controls.TControl.PopupMenu"/>
|
|
<element name="TLabel.ShowAccelChar" link="#lcl.stdctrls.TCustomLabel.ShowAccelChar"/>
|
|
<element name="TLabel.ShowHint" link="#lcl.controls.TControl.ShowHint"/>
|
|
<element name="TLabel.Transparent" link="#lcl.stdctrls.TCustomLabel.Transparent"/>
|
|
<element name="TLabel.Visible" link="#lcl.controls.TControl.Visible"/>
|
|
<element name="TLabel.WordWrap" link="#lcl.stdctrls.TCustomLabel.WordWrap"/>
|
|
<element name="TLabel.OnChangeBounds" link="#lcl.controls.TControl.OnChangeBounds"/>
|
|
<element name="TLabel.OnClick" link="#lcl.controls.TControl.OnClick"/>
|
|
<element name="TLabel.OnContextPopup" link="#lcl.controls.TControl.OnContextPopup"/>
|
|
<element name="TLabel.OnDblClick" link="#lcl.controls.TControl.OnDblClick"/>
|
|
<element name="TLabel.OnDragDrop" link="#lcl.controls.TControl.OnDragDrop"/>
|
|
<element name="TLabel.OnDragOver" link="#lcl.controls.TControl.OnDragOver"/>
|
|
<element name="TLabel.OnEndDrag" link="#lcl.controls.TControl.OnEndDrag"/>
|
|
<element name="TLabel.OnMouseDown" link="#lcl.controls.TControl.OnMouseDown"/>
|
|
<element name="TLabel.OnMouseEnter" link="#lcl.controls.TControl.OnMouseEnter"/>
|
|
<element name="TLabel.OnMouseLeave" link="#lcl.controls.TControl.OnMouseLeave"/>
|
|
<element name="TLabel.OnMouseMove" link="#lcl.controls.TControl.OnMouseMove"/>
|
|
<element name="TLabel.OnMouseUp" link="#lcl.controls.TControl.OnMouseUp"/>
|
|
<element name="TLabel.OnMouseWheel" link="#lcl.controls.TControl.OnMouseWheel"/>
|
|
<element name="TLabel.OnMouseWheelDown" link="#lcl.controls.TControl.OnMouseWheelDown"/>
|
|
<element name="TLabel.OnMouseWheelUp" link="#lcl.controls.TControl.OnMouseWheelUp"/>
|
|
<element name="TLabel.OnMouseWheelHorz" link="#lcl.controls.TControl.OnMouseWheelHorz"/>
|
|
<element name="TLabel.OnMouseWheelLeft" link="#lcl.controls.TControl.OnMouseWheelLeft"/>
|
|
<element name="TLabel.OnMouseWheelRight" link="#lcl.controls.TControl.OnMouseWheelRight"/>
|
|
<element name="TLabel.OnResize" link="#lcl.controls.TControl.OnResize"/>
|
|
<element name="TLabel.OnStartDrag" link="#lcl.controls.TControl.OnStartDrag"/>
|
|
|
|
<element name="CreateEmulatedTextHintFont">
|
|
<short>Gets the font instance used for an emulated TextHint display.</short>
|
|
<descr>
|
|
<p>
|
|
<var>CreateEmulatedTextHintFont</var> is a <var>TFont</var> function which
|
|
gets the font instance used to display an emulated TextHint in the control.
|
|
It is retrieved by calling the <var>CreateEmulatedTextHintFont</var> method
|
|
in the widgetset class. Widgetset classes use the font assigned to the
|
|
control, but change the font color to <b>clGrayText</b>.
|
|
</p>
|
|
<p>
|
|
CreateEmulatedTextHintFont is called from <var>FontChanged</var>, and the
|
|
private <var>ShowEmulatedTextHint</var> method.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TCustomEdit.FontChanged"/>
|
|
<link id="TCustomEdit.TextHint"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="CreateEmulatedTextHintFont.Result">
|
|
<short>TFont instance used for the emulated TextHint.</short>
|
|
</element>
|
|
|
|
<element name="Register">
|
|
<short>Registers components declared in the unit.</short>
|
|
<descr>
|
|
<p>
|
|
<var>Register</var> is a procedure used to register components in the
|
|
<file>stdctrls.pp</file> unit for use in the Lazarus IDE.
|
|
</p>
|
|
<p>
|
|
Register calls <var>RegisterComponents</var> to add the following components
|
|
to the <b>Standard</b> tab in the IDE:
|
|
</p>
|
|
<ul>
|
|
<li>TButton</li>
|
|
<li>TLabel</li>
|
|
<li>TEdit</li>
|
|
<li>TMemo</li>
|
|
<li>TToggleBox</li>
|
|
<li>TCheckBox</li>
|
|
<li>TRadioButton</li>
|
|
<li>TListBox</li>
|
|
<li>TComboBox</li>
|
|
<li>TScrollBar</li>
|
|
<li>TGroupBox</li>
|
|
</ul>
|
|
<p>
|
|
Register calls RegisterComponents to add the following components to the
|
|
<b>Additional</b> tab in the IDE:
|
|
</p>
|
|
<ul>
|
|
<li>TStaticText</li>
|
|
</ul>
|
|
</descr>
|
|
</element>
|
|
|
|
<topic name="HowToUseStdCtrls">
|
|
<short>
|
|
How to use <var>StdCtrls</var>, <var>ComCtrls</var> or <var>ExtCtrls</var>.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
The Units <var>StdCtrls</var>, <var>ComCtrls</var> and <var>ExtCtrls</var>
|
|
contain definitions and descriptions of many of the most commonly used
|
|
controls for constructing Forms and other objects in Lazarus GUI applications.
|
|
</p>
|
|
<p>
|
|
Most controls are split into a final class, such as <var>TButton</var>,
|
|
<var>TMemo</var>, <var>TScrollBar</var> etc., and a corresponding ancestor
|
|
class such as <var>TCustomButton</var>, <var>TCustomMemo</var> or
|
|
<var>TCustomScrollBar</var>. The final class is designed for immediate use,
|
|
it almost only publishes the properties of the control. The corresponding
|
|
custom ancestor class (<var>TCustomXXX</var>) can be used to derive controls
|
|
with special (customized) appearance or behavior.
|
|
</p>
|
|
<p>
|
|
If you drop a component from the component palette on the form editor you
|
|
don't need to add code explicitly to create it. The component is
|
|
automatically created by the IDE together with the form, and destroyed when
|
|
the form is destroyed.
|
|
</p>
|
|
<p>
|
|
However, if you create the component yourself by code, and don't specify an
|
|
Owner for it (Create(<b>Nil</b>)), you are responsible for freeing the
|
|
component when it is no longer needed. You should construct it with
|
|
Create(Self), where Self means the containing Form or Parent control.
|
|
</p>
|
|
<p>
|
|
A control also must have a Parent control, maybe the Form, so that it can
|
|
become visible within the client area of its Parent. The Top and Left
|
|
properties specify the placement of the control within its <b>Parent</b>. The
|
|
Object Tree reflects the Parent-Client relationships of all controls on the
|
|
form.
|
|
</p>
|
|
<p>
|
|
Unlike controls, mere <var>components</var> are invisible at run-time (Open
|
|
Dialogs...). Controls can be made invisible at run-time as well, by setting
|
|
their Visible property to <b>False</b>.
|
|
</p>
|
|
<p>
|
|
If you place a component on the Form Designer and look at the Object
|
|
Inspector, you can observe the Top and Left properties change as you move the
|
|
component around. The same for the Width and Height properties, when you
|
|
resize a control by dragging it's size grips.
|
|
</p>
|
|
<p>
|
|
When you modify the properties in the Object Inspector, the control on the
|
|
form will reflect the changes as well.
|
|
</p>
|
|
<p>
|
|
You can also explicitly change the properties of the object in code by typing
|
|
(in the appropriate Implementation section of the Source editor), for example
|
|
</p>
|
|
<code>
|
|
Form1.Button1.Height := 48;
|
|
</code>
|
|
<p>
|
|
In summary, there are usually about three different ways to determine each
|
|
property of a component:
|
|
</p>
|
|
<ul>
|
|
<li>by using the mouse,</li>
|
|
<li>by setting the values in the Object Inspector,</li>
|
|
<li>or explicitly by writing code.</li>
|
|
</ul>
|
|
<p>
|
|
The components defined in these Units have several properties that are common
|
|
to most of them, and other properties that are specific to the individual
|
|
components. We shall describe the most common ones here. Unusual or
|
|
control-specific properties will be described for the individual controls.
|
|
</p>
|
|
<p>
|
|
Additional Help can always be obtained by selecting a property or keyword, in
|
|
either the Object Inspector or the Source Editor, and pressing <b>F1</b>. You
|
|
will be taken by your Help browser to the appropriate page in the
|
|
documentation.
|
|
</p>
|
|
<p>
|
|
If the description of a property on that page is insufficient, you can
|
|
navigate to the corresponding description in the ancestor classes, by
|
|
selecting the links in the Inheritance listing or by selecting the ancestor
|
|
Type in the declaration of the object.
|
|
</p>
|
|
<p>
|
|
<b>Some commonly listed properties</b>
|
|
</p>
|
|
<table>
|
|
<th>
|
|
<td>Property</td>
|
|
<td>Meaning</td>
|
|
</th>
|
|
<tr>
|
|
<td>Action</td>
|
|
<td>
|
|
Use Action when e.g. a button and a menu entry shall perform the same task,
|
|
e.g. the <var>Close</var> action.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Align</td>
|
|
<td>
|
|
Defines how a control is lined up within its parent control. Possible values
|
|
are alTop, alBottom (stacked at the top or bottom, using the full available
|
|
width), alLeft, alRight (placed at the left or right, using the full
|
|
available height), alNone (place anywhere on parent control) or alClient
|
|
(takes all available space left over by other controls).
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Anchor</td>
|
|
<td>
|
|
Used to keep a control at a fixed distance from the edges of its Parent
|
|
control, when the Parent is resized. For example <b>[akBottom, akRight]</b>
|
|
will keep the control a fixed distance from the bottom right corner.
|
|
Anchoring both [akLeft, akRight] will make the control extend or shrink in
|
|
Width, together with its Parent.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>AutoSelect</td>
|
|
<td>
|
|
When <b>True</b>, a text control will select all its text when it receives
|
|
focus or when the Enter key is pressed.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>AutoSelected</td>
|
|
<td>
|
|
<b>True</b> indicate that the edit or combo-box control has performed an
|
|
AutoSelect operation, so that subsequent mouse-clicks and keystrokes proceed
|
|
normally without selecting the text.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>BorderSpacing</td>
|
|
<td>The space around the edge between an control and its siblings.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Caption</td>
|
|
<td>
|
|
The text that is displayed on the control; it should preferably give some
|
|
clue as to the function of the control, or an instruction such as 'Close' or
|
|
'Execute'. By default Caption is set to be the same as the 'Name' property,
|
|
and the application designer should substitute meaningful text instead of the
|
|
default values.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>CharCase</td>
|
|
<td>
|
|
Indicates how text is displayed in a text editing control: Normal (retaining
|
|
the case of the letters typed by the user), converted to uppercase, or
|
|
converted to lowercase
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Constraints</td>
|
|
<td>
|
|
Sets the minimum and maximum sizes for a control. If a control is resized the
|
|
new dimensions are always within the ranges given here. You should take care
|
|
when setting these options that they do not conflict with the Anchors and
|
|
Align settings.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Color</td>
|
|
<td>The Color to be used to draw the control's background.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Enabled</td>
|
|
<td>
|
|
Determines whether a control can be selected or perform an action. If it is
|
|
not <var>Enabled</var>, it is often <b>Grayed</b> out on the Form.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Font</td>
|
|
<td>
|
|
The Font to be used for writing the text associated with the control - either
|
|
the caption or label, or the text-strings contained within the control. The
|
|
entry on the Object Inspector usually has a (+) box on the left, and
|
|
selecting this box reveals further options such as character set, color and
|
|
size.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Hint</td>
|
|
<td>A short informative pop-up text that appears when the mouse-cursor moves
|
|
over the control.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Items</td>
|
|
<td>
|
|
The list of 'Things' that the object contains, such as a group of images, a
|
|
series of lines of text, a number of actions in an action list, etc.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Lines</td>
|
|
<td>
|
|
An array of strings, containing the paragraph texts in Memo controls. The
|
|
array index is zero-based, i.e. the lines are numbered 0..numLines-1.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Name</td>
|
|
<td>
|
|
The identifier by which the control is known in the program. The IDE gives it
|
|
a default name based on the underlying type, for example successive instances
|
|
of TBitButton would be named Form1.BitButton1 and Form1.BitButton2; it is up
|
|
to the application programmer to give them more meaningful names such as
|
|
ExitButton or OKButton. By default the Name of the control is applied to the
|
|
Caption for the control, but the text of the Caption may be changed
|
|
separately.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>PopUpMenu</td>
|
|
<td>
|
|
A window containing context-sensitive menu entries, that pops up when the
|
|
right mouse button is clicked on the object.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Position (or Top, Left)</td>
|
|
<td>Determines where the control is located on the parent form or
|
|
control.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>ReadOnly</td>
|
|
<td>If <b>True</b>, the user cannot change the text in the control.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>ShowHint</td>
|
|
<td>Allows to enable or suppress <var>Hints</var>.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Size (or Height and Width)</td>
|
|
<td>The dimensions of the control</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Style</td>
|
|
<td>
|
|
The options available for Style depend upon the sort of Control being
|
|
considered: for instance the Style may be defined by TFormStyle,
|
|
TBorderStyle, TButtonStyle etc.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>TabOrder</td>
|
|
<td>
|
|
Specifies the sequence of controls, that are entered when the user presses
|
|
the Tab key.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>TabStop</td>
|
|
<td>Specifies whether the control can be reached (or is skipped) by pressing
|
|
the Tab key.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Text</td>
|
|
<td>
|
|
Like Caption, the <b>user editable</b> text that appears in the control.
|
|
Applies particularly to Edit, Memo and Combo-Box types of controls. Most of
|
|
the editing operations (such as <var>Select</var>, <var>Clear</var>,
|
|
<var>Cut</var>, <var>Copy</var>) are performed in this property. If the
|
|
control contains more than a single line of text, then the textual elements
|
|
are arranged as a zero-based array of strings in <var>Lines</var>
|
|
(<var>TMemo</var>) or <var>Items</var> (<var>TListBox</var>,
|
|
<var>TComboBox</var>).
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Visible</td>
|
|
<td>If <b>True</b>, the control can be seen on the Form; if <b>False</b>, it
|
|
is hidden.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>WordWrap</td>
|
|
<td>
|
|
Allows wrapping the Text into multiple lines. When <b>False</b>, the text is
|
|
clipped at the right margin of the control, but it still can be inspected by
|
|
moving the caret within the text.
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<p>
|
|
The 'Events' tab in the Object Inspector contains a list with events, which
|
|
can occur for this control. If you select an entry in the list, a combo-box
|
|
appears with a drop-down list showing any event handlers that have already
|
|
been defined, and allowing you to choose one for this event. Alternatively
|
|
you can select the ellipsis (three dots ...) and you will be taken to the
|
|
Source Editor, where the Object Inspector created an new event handler method
|
|
for you. You also can type the name of your handler in the Object Inspector
|
|
and press Enter, to create a new handler method.
|
|
</p>
|
|
<p>
|
|
While a large number of events is available for any given control, in
|
|
practice it is only necessary to populate a few of them. For most controls,
|
|
it is sufficient to provide coding for 'OnClick'; for more complex controls
|
|
it may be necessary also to provide for 'OnEntry' (when the control receives
|
|
the focus) and 'OnExit' (when the control looses the focus); or you may need
|
|
to write an event handler for 'OnChange' or 'OnScroll', depending on the
|
|
nature of the particular control with which you are dealing.
|
|
</p>
|
|
<p>
|
|
Many controls have a default event, usually OnClick, for which an handler is
|
|
created with a double click on the control. Or right click on the control,
|
|
and select the first entry: 'Create default event'.
|
|
</p>
|
|
<p>
|
|
A common strategy in Object-Oriented programming is to provide an <link
|
|
id="#lcl.ActnList.TActionList">ActionList</link> with the facility for
|
|
entering, removing or editing a number of predefined actions, from which the
|
|
most appropriate can be selected to use in any particular instance.
|
|
</p>
|
|
<p>
|
|
<b>Some commonly listed Actions</b>
|
|
</p>
|
|
<table>
|
|
<th>
|
|
<td>Event</td>
|
|
<td>Meaning</td>
|
|
</th>
|
|
<tr>
|
|
<td>OnChange</td>
|
|
<td>
|
|
Action to be taken if any change is detected (e.g. by mouse click, key press,
|
|
edit text, etc).
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>OnClick</td>
|
|
<td>
|
|
Action to be taken when the (left) mouse button is clicked. This is usually
|
|
the main or default action of the control; for example clicking on a button
|
|
or check box initiates the action associated with the check box. It may
|
|
alternatively initiate a process of selection, for instance in a TextBox or
|
|
Memo.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Click</td>
|
|
<td>
|
|
A method to emulate in code the effect of clicking on a control. This method
|
|
is most often found in Button-type controls (TButton, TBitBtn, TSpeedButton
|
|
etc). A procedure can be written that calls the same code as the OnClick
|
|
action. This facility can be particularly useful if the activation of one
|
|
control by clicking causes a cascade of other controls to be activated, and
|
|
the Click method can be used to initiate the action rather than having the
|
|
user explicitly click on a lot of controls.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>OnDragDrop</td>
|
|
<td>
|
|
Action to be taken when a dragged control has been dropped onto this control.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>OnEntry</td>
|
|
<td>
|
|
Action to be taken when the control receives the focus. This might include
|
|
changes in the appearance of the object such as highlighting or raising the
|
|
border.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>OnExit</td>
|
|
<td>
|
|
Action to be taken when control is about to loose the focus. This is the
|
|
right place for validity checks of user input, with a chance to disallow
|
|
moving to a different control when the input is invalid.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>OnKeyPress</td>
|
|
<td>Action to be taken on an entered character. Checks...???</td>
|
|
</tr>
|
|
<tr>
|
|
<td>OnKeyDown</td>
|
|
<td>
|
|
Action to be taken if a key is down while focus is in this control. This
|
|
allows one to filter or process control characters in a special way.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>OnKeyUp</td>
|
|
<td>
|
|
Action to be taken if a key goes up. This event occurs only once, while
|
|
auto-repeated keystrokes trigger multiple OnKeyDown or OnKeyPress events.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>OnMouseMove</td>
|
|
<td>
|
|
Action to be taken if the mouse cursor moves over the control. This event
|
|
fires with every small move, while OnMouseEnter and OnMouseLeave occur only
|
|
when the mouse enters or leaves the control.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>OnMouseDown</td>
|
|
<td>Action to be taken when a mouse button is pressed over the control.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>OnMouseUp</td>
|
|
<td>Action to be taken if a mouse button goes up over the control.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>OnResize</td>
|
|
<td>
|
|
Action to be taken when the control is resized. Might include re-alignment of
|
|
text or selection of a different font size etc. Do not mix up with AutoSize,
|
|
or you ask for trouble!
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<p>
|
|
<var>Constructors</var> such as <var>Create</var> allocate memory and system
|
|
resources needed by the object. They also call the constructor of any
|
|
sub-objects present in the class.
|
|
</p>
|
|
<p>
|
|
<var>Destructors</var> remove the object and de-allocate memory and other
|
|
resources. If you call <var>Destroy</var> for an object which hasn't being
|
|
initialized yet it will generate an error. Always use the <var>Free</var>
|
|
method to deallocate objects, because it checks whether an object's value is
|
|
<b>nil</b> before invoking <var>Destroy</var>.
|
|
</p>
|
|
<p>
|
|
Take the following precautions when creating your own <var>Destroy</var>
|
|
method:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
Declare <var>Destroy</var> with the <b>override</b> directive, because it is
|
|
a <b>virtual</b> method.
|
|
</li>
|
|
<li>
|
|
Always call the inherited Destroy method as the last action in the destructor
|
|
code.
|
|
</li>
|
|
<li>
|
|
Be aware that an <var>exception</var> may be raised by the
|
|
<var>constructor</var> when there is not enough memory to create an object,
|
|
or something else goes wrong. If the <var>exception</var> is not handled
|
|
inside the constructor, the object will be destroyed immediately. In this
|
|
case <var>Destroy</var> will be called with a partially initialized object,
|
|
so your destructor must check if the resources were really allocated before
|
|
disposing of them.
|
|
</li>
|
|
<li>
|
|
Remember to call <var>Free</var> for all objects created in the constructor.
|
|
</li>
|
|
</ul>
|
|
</descr>
|
|
</topic>
|
|
|
|
</module>
|
|
<!-- StdCtrls -->
|
|
</package>
|
|
</fpdoc-descriptions>
|