diff --git a/components/lazcontrols/docs/laznumedit.xml b/components/lazcontrols/docs/laznumedit.xml index 497afcd9c5..8864efc1fb 100644 --- a/components/lazcontrols/docs/laznumedit.xml +++ b/components/lazcontrols/docs/laznumedit.xml @@ -8,11 +8,10 @@ laznumedit ================================================================================ --> - Implements an edit control specialized for Integer values with a specific -numeric base. +numeric base (radix). @@ -28,10 +27,20 @@ numeric base. -Specifies an event handler signalled when the numeric base (radix) for an Integer edit control is changed. +Specifies an event handler signalled when the numeric base (radix) for an +Integer edit control is changed. - - + +

+TLazIntegerEditBaseChangeEvent is the type used for the OnBaseChange property +in TLazIntegerEditGen and TLazIntegerEdit. It allows actions to be performed +when the numeric base (radix) for an integer edit control is changed. +

+
+ + + +
@@ -59,7 +68,39 @@ Optional prefix for the new numeric base. Defines the base class for an Integer edit control using a specified numeric base. - + +

+TLazIntegerEditGen is the generic base class for an edit control which can +display and edit a 64-bit integer value using a specified numeric base or +radix. TLazIntegerEditGen is the ancestor for the TLazIntegerEdit type which +specializes the ancestor for the TCustomEdit type. +

+

+TLazIntegerEditGen introduces properties which determine the appearance and +editing behavior for the control, including: Value, MinValue, MaxValue, and +DisplayBase. +

+

+Value contains the decimal (base-10) value for the control as an Int64 type. +MinValue and MaxValue control the lower and upper limits for the value in the +control. DisplayBase determines the numeric base (base-2, base-8, base-16, +etc.) used to display and edit the text for for the control. +

+

+Changing the value in DisplayBase causes the Value to be converted to the +specified numeric base and the control is updated. A prefix is displayed for +some numeric base values like base-2 (binary), base-8 (octal) and base-16 +(hexadecimal). Other numeric base values do not use a prefix. +

+

+The edit control supports changing the numeric base using DisplayBase, or using +key presses which force the radix to be changed. See ToggleBinKeys, +ToggleOctKeys, ToggleHexKeys for more information. +

+

+Use the OnBasechange event handler to perform actions needed when DisplayBase is changed for the control. +

+
TCustomEdit @@ -72,7 +113,11 @@ base. Lower limit for the Int64 value in the control. - + + + + +
@@ -80,7 +125,11 @@ Lower limit for the Int64 value in the control. Upper limit for the Int64 value in the control. - + + + + + @@ -147,70 +196,98 @@ Upper limit for the Int64 value in the control. - + +Implements an alternate KeyDown method used in the control. + - + +Virtual key code for the key down notification. + - + +Shift, Ctrl, Alt, or Meta modifier(s) for the key code. + - + +Implements an alternate KeyPress method used in the control. + - + +Character value for the key press notification. + - + +Implements an alternate UTF8KeyPress method used in the control. + - + +UTF-8 character value for the key press notification. + - + +Implements an alternate InitializeWnd method used in the control. + - + +Implements an alternate RealGetText method used in the control. + - + +Caption text displayed in the edit box for the control. + - + +Implements an alternate FinalizeWnd method used in the control. + - + +Implements an alternate DoExit method used in the control. + - + +Implements an alternate EditingDone method used in the control. + - + +Implements an initialization routine used for new instances of the control. + @@ -218,121 +295,246 @@ Upper limit for the Int64 value in the control. -Integer value for the control as an Int64 type. +Value for the control as an Int64 type. - + +

+Value is an Int64 property which contains the decimal (base-10) value for the +control. Changing the property value causes the display Text in the control to +be updated and redisplayed. DisplayBase determines the numeric base (radix) for +the converted control Value. An optional prefix is used for numeric base values +in DisplayBase like base-2 (binary), base-8 (octal), and base-16 (hexadecimal). +

+

+Use MinValue and MaxValue to set lower and upper limits for the control Value. +

+
-Value for the control before EditingDone is called or the focused control is -changed. +Value for the control before EditingDone is called or the control loses focus. - - + +

+CurrentValue is a read-only Int64 property which contains the control value +while editing is active and before the control loses focus. The property value +is derived by reading the Text in the edit box and converting it from the +selected DisplayBase back to a decimal (base-10) value. If a handle has not +been allocated for the contro, the Value property is used instead. +

+

+Use Valid to determine if the edit box contains a valid value for the specified +DisplayBase. +

+
+ + + + + +
-Indicates whether the value in the CurrentValue property is valid. +Indicates whether the value in the CurrentValue property is valid for the +selected DisplayBase. - + + + + - + +Contains the lower limit for the Value property. + - + + + + - + +Contains the upper limit for the Value property. + - + + + + - - + +Contains the numeric base (radix) for the value displayed in the control. + + +

+DisplayBase is an Integer property which contains the numeric base (or radix) for the value displayed and maintained in the edit control. +

+

+DisplayBase determines the number of digits used to represent the Value in the +control and controls the conversion performed to get the display value. The +default value for the property is 10 and indicates the control displays its +Value using base-10 or decimal notation. +

+

+DisplayBase must be in the range 2..35; a value outside this range is +normalized to the lower or upper limit. +

+

+Changing the value for the property causes the OnBaseChange event handler to be +signalled (when assigned) using the old and new values for the property and the +optional prefix for the new numeric base (radix). +

+

+The Text for control is updated by converting Value to the specified radix and +applying the prefix for the DisplayBase. See BinIndicator, OctIndicator, and +HexIndicator for more information about common prefixes used for selected +DisplayBase values. +

+
- + +Contains the characters or keys which can be applied to the edit control for a +value using the decimal (base-10) radix. + - + +Contains the prefix used for a control value displayed in hexadecimal format +(DisplayBase = 16). + - + +Contains the characters or keys which can be applied to the edit control for a +value using the hexadecimal (base-16) radix. + - + +Contains key(s) which cause the DisplayBase to be toggled between decimal (10) +and hexadecimal (16) display formats. + - + +Contains the prefix used for a control value displayed in octal format +(DisplayBase = 8). + - + +Contains the characters or keys which can be applied to the edit control for a +value using the octal (base-8) radix. + - + +Contains key(s) which cause the DisplayBase to be toggled between decimal (10) +and octal (8) display formats. + - + +Contains the prefix used for a control value displayed in binary format +(DisplayBase = 2). + - + +Contains the characters or keys which can be applied to the edit control for a +value using the binary (base-2) radix. + - + +Contains key(s) which cause the DisplayBase to be toggled between decimal (10) +and binary (2) display formats. + - - - + +Event handler signalled when the value in DisplayBase is changed. + + +

+OnBaseChange allows the control to perform actions needed when the value for +the DisplayBase property is changed. It is signalled (when assigned) after the +value in DisplayBase has been updated but before the Text in control is +converted and displayed using the new radix. It allows the application to +override the new numeric base or radix and prefix in the event handler. +

+

+See TLazIntegerEditBaseChangeEvent for more information about the handler type +and its arguments. +

+

+OnBaseChange is a public property and does not appear in the Object +Inspector at design-time; it must be assigned at run-time using an object +procedure which implements the signature for the event. +

+
+ + + + +
- + +Indicates whether the '-' key can be used when editing the control value. + - + +Indicates whether the '+' key can be used when editing the control value. + @@ -345,9 +547,11 @@ Indicates whether the value in the CurrentValue property is valid. --> + -Implements an edit control for Integer values using a specified numeric base. +Implements an edit control for Integer values displayed and maintained using a +specified numeric base or radix. @@ -492,13 +696,14 @@ Owner of the class instance. + + + + + + + - - - - - - @@ -556,7 +761,7 @@ Owner of the class instance. -Converts the specified string to a word value using the specified numeric base. +Converts the specified string to a QWord value using the specified numeric base. @@ -574,7 +779,7 @@ Converts the specified string to a word value using the specified numeric base. -Converts a Word value using the specified numeric base to its string +Converts a QWord value using the specified numeric base to its string representation.