Docs: DateTimeCtrls/datetimepicker. Adds missing content in topics. Removes redundant whitespace.

This commit is contained in:
dsiders 2023-02-06 00:34:33 +00:00
parent 78177538d0
commit 87907d6028

View File

@ -571,13 +571,14 @@ Base class for date/time picker controls.
</short> </short>
<descr> <descr>
<p> <p>
TCustomDateTimePicker is a TCustomControl descendant. It is the base class for <var>TCustomDateTimePicker</var> is a TCustomControl descendant. It is the
date/time picker controls like TDateTimePicker and TDBDateTimePicker. The base class for date/time picker controls like TDateTimePicker and
control allows the user to enter Date, Time, or DateTime values. It TDBDateTimePicker. The control allows the user to enter Date, Time, or
incorporates a button on the control to display a drop-down calendar for date DateTime values. It incorporates a button on the control to display a
values, or up and down buttons to increment and decrement the numeric values drop-down calendar for date values, or up and down buttons to increment and
in a time. Individual parts in the date/time values can be changed using the decrement the numeric values in a time. Individual parts in the date/time
Up and Down cursor keys, or by entering the value directly into the control. values can be changed using the Up and Down cursor keys, or by entering the
value directly into the control.
</p> </p>
<p> <p>
TCustomDateTimePicker uses locale-specific settings to format and display TCustomDateTimePicker uses locale-specific settings to format and display
@ -2112,7 +2113,9 @@ MinDate or MaxDate values.
<seealso/> <seealso/>
</element> </element>
<element name="TCustomDateTimePicker.SetDateTimeJumpMinMax.AValue"> <element name="TCustomDateTimePicker.SetDateTimeJumpMinMax.AValue">
<short/> <short>
Value assigned to DateTime.
</short>
</element> </element>
<element name="TCustomDateTimePicker.ArrangeCtrls"> <element name="TCustomDateTimePicker.ArrangeCtrls">
@ -2138,6 +2141,7 @@ value has been changed.
<link id="TCustomDateTimePicker.UpdateDate"/> <link id="TCustomDateTimePicker.UpdateDate"/>
<link id="TCustomDateTimePicker.OnChange"/> <link id="TCustomDateTimePicker.OnChange"/>
<link id="TCustomDateTimePicker.AddHandlerOnChange"/> <link id="TCustomDateTimePicker.AddHandlerOnChange"/>
<link id="TCustomDateTimePicker.RemoveHandlerOnChange"/>
</seealso> </seealso>
</element> </element>
@ -2202,73 +2206,189 @@ keys applied to the control result in a new Date or Time value.
</element> </element>
<element name="TCustomDateTimePicker.DoAutoAdjustLayout"> <element name="TCustomDateTimePicker.DoAutoAdjustLayout">
<short/> <short>
<descr/> Applies an automatic layout policy and scaling proportions to the control.
<seealso/> </short>
<descr>
<p>
<var>DoAutoAdjustLayout</var> is an overridden method in
TCustomDateTimePicker. It calls the inherited method on entry to resize the
control using the specified layout policy and scaling factors. It ensures that
the width for drop-down or up/down button on the control is scaled from its
default value to the PPI setting used in the Font.
</p>
<p>
Font scaling is performed in AutoAdjustLayout (when needed) and occurs prior
to calling DoAutoAdjustLayout.
</p>
</descr>
<seealso>
<link id="#lcl.controls.TControl.DoAutoAdjustLayout">TControl.DoAutoAdjustLayout</link>
</seealso>
</element> </element>
<element name="TCustomDateTimePicker.DoAutoAdjustLayout.AMode"> <element name="TCustomDateTimePicker.DoAutoAdjustLayout.AMode">
<short/> <short>
Automatic layout policy applied in the method. It is a value from the
TLayoutAdjustmentPolicy enumeration, and determines whether horizontal /
vertical / or both sizes are adjusted in the method. It generally reflects the
constraints for the device type where the application is running.
</short>
</element> </element>
<element name="TCustomDateTimePicker.DoAutoAdjustLayout.AXProportion"> <element name="TCustomDateTimePicker.DoAutoAdjustLayout.AXProportion">
<short/> <short>
Scaling factor applied to the horizontal size in the control.
</short>
</element> </element>
<element name="TCustomDateTimePicker.DoAutoAdjustLayout.AYProportion"> <element name="TCustomDateTimePicker.DoAutoAdjustLayout.AYProportion">
<short/> <short>
Scaling factor applied to the vertical size in the control.
</short>
</element> </element>
<element name="TCustomDateTimePicker.AddHandlerOnChange"> <element name="TCustomDateTimePicker.AddHandlerOnChange">
<short/> <short>
<descr/> Adds the specified handler routine to the internal list of OnChange event
handlers for the control.
</short>
<descr>
<p>
<var>AddHandlerOnChange</var> ensures that the internal TMethodList for the
class instance has been allocated, and calls its Add method using the
specified argument values.
</p>
</descr>
<seealso/> <seealso/>
</element> </element>
<element name="TCustomDateTimePicker.AddHandlerOnChange.AOnChange"> <element name="TCustomDateTimePicker.AddHandlerOnChange.AOnChange">
<short/> <short>
Handler routine added to the handler list in the method.
</short>
</element> </element>
<element name="TCustomDateTimePicker.AddHandlerOnChange.AsFirst"> <element name="TCustomDateTimePicker.AddHandlerOnChange.AsFirst">
<short/> <short>
<b>True</b> if the handler routine is stored as the first handler in the list.
<b>False</b> if it is appended to end of the list.
</short>
</element> </element>
<element name="TCustomDateTimePicker.AddHandlerOnCheckBoxChange"> <element name="TCustomDateTimePicker.AddHandlerOnCheckBoxChange">
<short/> <short>
<descr/> Adds the specified handler routine to the internal list of OnCheckBoxChange
events handlers for the control.
</short>
<descr>
<p>
<var>AddHandlerOnCheckBoxChange</var> ensures that the internal TMethodList
for the class instance has been allocated, and calls its Add method using the
specified argument values.
</p>
</descr>
<seealso/> <seealso/>
</element> </element>
<element name="TCustomDateTimePicker.AddHandlerOnCheckBoxChange.AOnCheckBoxChange"> <element name="TCustomDateTimePicker.AddHandlerOnCheckBoxChange.AOnCheckBoxChange">
<short/> <short>
Handler routine added to the handler list in the method.
</short>
</element> </element>
<element name="TCustomDateTimePicker.AddHandlerOnCheckBoxChange.AsFirst"> <element name="TCustomDateTimePicker.AddHandlerOnCheckBoxChange.AsFirst">
<short/> <short>
<b>True</b> if the handler routine is stored as the first handler in the list.
<b>False</b> if it is appended to end of the list.
</short>
</element> </element>
<element name="TCustomDateTimePicker.RemoveHandlerOnChange"> <element name="TCustomDateTimePicker.RemoveHandlerOnChange">
<short/> <short>
Removes the specified OnChange handler routine from the internal list for the
handler type.
</short>
<descr/> <descr/>
<seealso/> <seealso>
<link id="TCustomDateTimePicker.AddHandlerOnChange"/>
</seealso>
</element> </element>
<element name="TCustomDateTimePicker.RemoveHandlerOnChange.AOnChange"> <element name="TCustomDateTimePicker.RemoveHandlerOnChange.AOnChange">
<short/> <short>
Handler routine removed in the method.
</short>
</element> </element>
<element name="TCustomDateTimePicker.RemoveHandlerOnCheckBoxChange"> <element name="TCustomDateTimePicker.RemoveHandlerOnCheckBoxChange">
<short/> <short>
Removes the specified OnCheckBoxChange handler routine from the internal list
for the handler type.
</short>
<descr/> <descr/>
<seealso/> <seealso/>
</element> </element>
<element name="TCustomDateTimePicker.RemoveHandlerOnCheckBoxChange.AOnCheckBoxChange"> <element name="TCustomDateTimePicker.RemoveHandlerOnCheckBoxChange.AOnCheckBoxChange">
<short/> <short>
Handler routine removed in the method.
</short>
</element> </element>
<element name="TCustomDateTimePicker.EffectiveHideDateTimeParts"> <element name="TCustomDateTimePicker.EffectiveHideDateTimeParts">
<short/> <short>
<descr/> Set with the date/time parts which are effectively hidden on the control.
<seealso/> </short>
<descr>
<p>
<var>EffectiveHideDateTimeParts</var> is a read-only TEffectiveDateTimeParts
property which contains the date/time parts which are effectively hidden for
the control. Values are included in the set to indicate that specific date/
time parts are not visible for the configuration settings in the control, or
explicitly hidden using the HideDateTimeParts property.
</p>
<p>
Properties which affect date/time part visibility include:
</p>
<ul>
<li>Kind</li>
<li>TimeDisplay</li>
<li>TimeFormat</li>
<li>HideDateTimeParts</li>
</ul>
<p>
The TDateTimePart values in EffectiveHideDateTimeParts are determined when a
new value is assigned to one of these properties.
</p>
</descr>
<seealso>
<link id="TCustomDateTimePicker.Kind"/>
<link id="TCustomDateTimePicker.TimeDisplay"/>
<link id="TCustomDateTimePicker.TimeFormat"/>
<link id="TCustomDateTimePicker.HideDateTimeParts"/>
<link id="TEffectiveDateTimeParts"/>
<link id="TDateTimePart"/>
</seealso>
</element> </element>
<element name="TCustomDateTimePicker.EffectiveDateDisplayOrder"> <element name="TCustomDateTimePicker.EffectiveDateDisplayOrder">
<short/> <short>
<descr/> Indicates the effective display order for the date parts on the control.
<seealso/> </short>
<descr>
<p>
<var>EffectiveDateDisplayOrder</var> is a read-only TDateDisplayOrder property
which contains the effective order for the date parts displayed on the
control. It reflects the order for the date found parts found when
DateDisplayOrder contains ddoTryDefault.
</p>
<p>
The value for the property is assigned when the value in the DateDisplayOrder
property is changed. It indicates the order for the date parts found in the
date formats from DefaultFormatSettings. The tokens in the short date format
are examined to determine the order for the date parts. If an order cannot be
determined using the short date format, the long date format in
DefaultFormatSettings is checked. If an order cannot be determined using
either format value, the order indicated by ddoYMD is used.
</p>
</descr>
<seealso>
<link id="TCustomDateTimePicker.DateDisplayOrder"/>
<link id="TDateDisplayOrder"/>
<link id="#rtl.sysutils.DefaultFormatSettings">SysUtils.DefaultFormatSettings</link>
</seealso>
</element> </element>
<element name="TCustomDateTimePicker.BorderStyle"> <element name="TCustomDateTimePicker.BorderStyle">
@ -2633,19 +2753,26 @@ additional OnChange handler routines for the control.
</element> </element>
<element name="TCustomDateTimePicker.OnCheckBoxChange"> <element name="TCustomDateTimePicker.OnCheckBoxChange">
<short/> <short>
Event handler signalled when the Checked state for a check box on the control has been changed.
</short>
<descr/> <descr/>
<seealso/> <seealso/>
</element> </element>
<element name="TCustomDateTimePicker.OnDropDown"> <element name="TCustomDateTimePicker.OnDropDown">
<short/> <short>
Event handler signalled when the drop-down calendar dialog for the control has
been displayed.
</short>
<descr/> <descr/>
<seealso/> <seealso/>
</element> </element>
<element name="TCustomDateTimePicker.OnCloseUp"> <element name="TCustomDateTimePicker.OnCloseUp">
<short/> <short>
Event handler signalled when the drop-down calendar dialog has been closed.
</short>
<descr/> <descr/>
<seealso/> <seealso/>
</element> </element>
@ -3516,28 +3643,50 @@ control, which includes:
<li>MinDate (TheSmallestDate)</li> <li>MinDate (TheSmallestDate)</li>
<li>MaxDate (TheSmallestDate)</li> <li>MaxDate (TheSmallestDate)</li>
<li>CenturyFrom (1941)</li> <li>CenturyFrom (1941)</li>
<li>
CustomMonthNames (Resources allocated and configured to redraw the control
when changed).
</li>
</ul> </ul>
<p> <p>
Create sets the value for each of the text segments used during editing of the Create sets the value for each of the text segments used during editing of the
date or time parts to an empty string (''). date or time parts to an empty string ('').
</p> </p>
<p> <p>
The effect display order and visibility for the date/time parts is initially The effective display order and visibility for the date/time parts is
determined in the method. initially determined in the method.
</p> </p>
</descr> </descr>
<seealso/> <seealso/>
</element> </element>
<element name="TCustomDateTimePicker.Create.AOwner"> <element name="TCustomDateTimePicker.Create.AOwner">
<short/> <short>
Owner of the class instance which receives notification events.
</short>
</element> </element>
<element name="TCustomDateTimePicker.Destroy"> <element name="TCustomDateTimePicker.Destroy">
<short> <short>
Destructor for the class instance. Destructor for the class instance.
</short> </short>
<descr/> <descr>
<seealso/> <p>
<var>Destroy</var> is the overridden destructor for the class instance. It
frees resources allocated in the class instance, including:
</p>
<ul>
<li>The drop-down or up/down button.</li>
<li>OnChange handler(s).</li>
<li>OnCheckBoxChange handler(s).</li>
<li>The TStringList instance for CustomMonthNames.</li>
</ul>
<p>
Destroy calls the inherited method prior to exit to free the class instance.
</p>
</descr>
<seealso>
<link id="TCustomDateTimePicker.Create"/>
</seealso>
</element> </element>
<element name="TCustomDateTimePicker.DateIsNull"> <element name="TCustomDateTimePicker.DateIsNull">
@ -3568,7 +3717,9 @@ Adjusts the selected text part to ensure it is on one of the values used for a
Date. Date.
</short> </short>
<descr/> <descr/>
<seealso/> <seealso>
<link id="TCustomDateTimePicker.SelectTime"/>
</seealso>
</element> </element>
<element name="TCustomDateTimePicker.SelectTime"> <element name="TCustomDateTimePicker.SelectTime">
@ -3577,7 +3728,9 @@ Adjusts the selected text part to ensure it is on one of the values used for a
Time. Time.
</short> </short>
<descr/> <descr/>
<seealso/> <seealso>
<link id="TCustomDateTimePicker.SelectDate"/>
</seealso>
</element> </element>
<element name="TCustomDateTimePicker.SendExternalKey"> <element name="TCustomDateTimePicker.SendExternalKey">
@ -3586,18 +3739,31 @@ Validates and applies the specified character to the control.
</short> </short>
<descr> <descr>
<p> <p>
Handles the following character values: <var>SendExternalKey</var> handles the following character values in
<var>AKey</var>:
</p> </p>
<dl> <dl>
<dt>'N'</dt> <dt>'N', 'n'</dt>
<dd>Sets DateTime to the NullDate value.</dd> <dd>
Applies the value in NullDate to the DateTime value for the control.
</dd>
<dt>'0'..'9'</dt> <dt>'0'..'9'</dt>
<dd>Applied to the value for the selected text part.</dd> <dd>Applied to the value for the selected text part.</dd>
<dt>'A', 'P'</dt> <dt>'A', P'</dt>
<dd>Applied to the AM/PM indicator in a 12-hour time value.</dd> <dd>Applied to the AM/PM indicator in a 12-hour time value when selected.</dd>
</dl> </dl>
<p>
Values in the LeadingZeros, AutoAdvance, and Options properties are enforced
after the character value is applied to the control.
</p>
<p>
No actions are performed in the method if the control or its text parts are
not Enabled, or ReadOnly is set to <b>True</b>.
</p>
</descr> </descr>
<seealso/> <seealso>
<link id="TCustomDateTimePicker.SendExternalKeyCode"/>
</seealso>
</element> </element>
<element name="TCustomDateTimePicker.SendExternalKey.aKey"> <element name="TCustomDateTimePicker.SendExternalKey.aKey">
<short> <short>
@ -3606,21 +3772,67 @@ Character value examined and optionally applied to the control.
</element> </element>
<element name="TCustomDateTimePicker.SendExternalKeyCode"> <element name="TCustomDateTimePicker.SendExternalKeyCode">
<short/> <short>
<descr/> Validates and applies the specified virtual key code to the control.
<seealso/> </short>
<descr>
<p>
<var>SendExternalKeyCode</var> handles the following virtual key values in
<var>Key</var>:
</p>
<dl>
<dt>VK_N ('N')</dt>
<dd>Sets DateTime to the NullDate value.</dd>
<dt>VK_0..VK_9 ('0'..'9')</dt>
<dd>Applied to the value for the selected text part.</dd>
<dt>VK_A ('A'), VK_P ('P')</dt>
<dd>Applied to the AM/PM indicator in a 12-hour time value when selected.</dd>
</dl>
<p>
If the text parts are enabled for the control, the value in Key is converted
to its character equivalent and SendExternalKey is used to apply the character
value.
</p>
<p>
If text parts are not enabled, the following value is handled for the control:
</p>
<dl>
<dt>VK_SPACE (#32)</dt>
<dd>Toggles the check box state when ShowCheckBox is set to <b>True</b>.</dd>
</dl>
</descr>
<seealso>
<link id="TCustomDateTimePicker.SendExternalKey"/>
</seealso>
</element> </element>
<element name="TCustomDateTimePicker.SendExternalKeyCode.Key"> <element name="TCustomDateTimePicker.SendExternalKeyCode.Key">
<short/> <short>
Virtual key code examined and optionally applied to the control.
</short>
</element> </element>
<element name="TCustomDateTimePicker.RemoveAllHandlersOfObject"> <element name="TCustomDateTimePicker.RemoveAllHandlersOfObject">
<short/> <short>
Removes all event handler routines for the specified object.
</short>
<descr/> <descr/>
<seealso/> <p>
<var>RemoveAllHandlersOfObject</var> is an overridden method in
TCustomDateTimePicker. It calls the inherited method on entry to remove all
event handlers attached to the TObject instance in AnObject. It calls the
RemoveAllMethodsOfObject method in the internal TMethodList instances in the
control to free the handler types maintained in TCustomDateTimePicker.
</p>
<seealso>
<link id="#lcl.controls.TControl.RemoveAllHandlersOfObject">TControl.RemoveAllHandlersOfObject</link>
<link id="#lcl.controls.TControlHandlerType">TControlHandlerType</link>
<link id="#lazutils.lazmethodlist.TMethodList.RemoveAllMethodsOfObject">TMethodList.RemoveAllMethodsOfObject</link>
</seealso>
</element> </element>
<element name="TCustomDateTimePicker.RemoveAllHandlersOfObject.AnObject"> <element name="TCustomDateTimePicker.RemoveAllHandlersOfObject.AnObject">
<short/> <short>
Object instance with the event handler routines removed in the method.
</short>
</element> </element>
<element name="TCustomDateTimePicker.Paint"> <element name="TCustomDateTimePicker.Paint">
@ -3672,7 +3884,7 @@ Performs actions needed when editing has been completed in the control.
<element name="TDateTimePicker"> <element name="TDateTimePicker">
<short> <short>
implements a date/time picker control. Implements a date/time picker control.
</short> </short>
<descr> <descr>
<p> <p>