Class TIDSNumberEdit (unit IDSNBRED) |
Inherits from
TCustomEdit
constructor Create(Owner : TComponent);
- Clean all formatting from text
procedure Change;
Converts a string to a double
procedure CreateParams(var Params : TCreateParams);
Set the initial value
procedure FocusGained(var Message: TMessage);
TA_RIGHT doesnt work
procedure FocusLost(var Message: TMessage);
Clean all formatting and select all characters
procedure KeyPress(var Key : Char);
procedure CleanText;
The value of the field } { Private functions Call inherited if this is not a change generated by code
function GetStrValue(dblIn:Double; blClean:Boolean):String;
Strips all the formatting chars from text Call the inherited method, and then force the value into range
function GetValue : Double;
Returns string value, with appropriate formatting Returned the string value
function ProcessValue(dblIn : Double) : Double;
Retreives the current value Key is not valid - kill it
procedure Recalc;
Processes a new value Check if above allowed range
procedure Redraw;
Recalculates the field value Set the color of the font
procedure SetAlignment(alignIn : TLeftRight);
Redraws the control } { Property access functions Set the text to the internal value
procedure SetBlankIfZero(blBIZ : Boolean);
Sets the new alignment Set the new alignment and recreate the window
procedure SetColorNeg(colIn : TColor);
Sets whether to blank if zero
procedure SetColorPos(colIn : TColor);
Sets the color for negative values
procedure SetFormatStr(strIn : String);
Sets the color for positive values
procedure SetMaxValue(dblIn : Double);
Sets the minimum value for the control
procedure SetMinValue(dblIn : Double);
Sets the formatting string Set the new format and recalc the value
procedure SetValue(dblIn : Double);
Sets the maximum value for the control
function StrToDbl(strIn : String) : Double;
Sets the field value Calc new value of control and redraw
property Alignment : TLeftRight
New properties
property AutoSelect :
Inherited properties and events
property AutoSize :
property BlankIfZero : Boolean
property BorderStyle :
property Color :
property ColorNeg : TColor
property ColorPos : TColor
property Ctl3D :
property Cursor :
property DragCursor :
property DragMode :
property Enabled :
property Font :
property FormatStr : String
property Height :
property HelpContext :
property HideSelection :
property Hint :
property Left :
property MaxValue : Double
property MinValue : Double
property ParentColor :
property ParentCtl3D :
property ParentShowHint :
property PopUpMenu :
property ReadOnly :
property ShowHint :
property TabOrder :
property TabStop :
property Tag :
property Top :
property Value : Double
property Visible :
property Width :
event OnChange :
event OnClick :
event OnDblClick :
event OnDragDrop :
event OnDragOver :
event OnEndDrag :
event OnEnter :
event OnExit :
event OnKeyDown :
event OnKeyPress :
event OnKeyUp :
event OnMouseDown :
event OnMouseMove :
event OnMouseUp :
blCodeChange : Boolean;
Private variables
FAlignment : TLeftRight;
Private fields
FBlankIfZero : Boolean;
The alignment for the field
FColorNeg : TColor;
Display blank if zero
FColorPos : TColor;
Color for negative text
FFormatStr : String;
Color for positive text
FMaxValue : Double;
Minimum value for field
FMinValue : Double;
Formatting string for the output text
FValue : Double;
Maximum value for field
constructor Create(Owner : TComponent);
Clean all formatting from text
procedure Change;
Converts a string to a double
procedure CreateParams(var Params : TCreateParams);
Set the initial value
procedure FocusGained(var Message: TMessage);
TA_RIGHT doesnt work
procedure FocusLost(var Message: TMessage);
Clean all formatting and select all characters
procedure KeyPress(var Key : Char);
procedure CleanText;
The value of the field } { Private functions
Call inherited if this is not a change generated by code
function GetStrValue(dblIn:Double; blClean:Boolean):String;
Strips all the formatting chars from text
Call the inherited method, and then force the value into range
function GetValue : Double;
Returns string value, with appropriate formatting
Returned the string value
function ProcessValue(dblIn : Double) : Double;
Retreives the current value
Key is not valid - kill it
procedure Recalc;
Processes a new value
Check if above allowed range
procedure Redraw;
Recalculates the field value
Set the color of the font
procedure SetAlignment(alignIn : TLeftRight);
Redraws the control } { Property access functions
Set the text to the internal value
procedure SetBlankIfZero(blBIZ : Boolean);
Sets the new alignment
Set the new alignment and recreate the window
procedure SetColorNeg(colIn : TColor);
Sets whether to blank if zero
procedure SetColorPos(colIn : TColor);
Sets the color for negative values
procedure SetFormatStr(strIn : String);
Sets the color for positive values
procedure SetMaxValue(dblIn : Double);
Sets the minimum value for the control
procedure SetMinValue(dblIn : Double);
Sets the formatting string
Set the new format and recalc the value
procedure SetValue(dblIn : Double);
Sets the maximum value for the control
function StrToDbl(strIn : String) : Double;
Sets the field value
Calc new value of control and redraw
property Alignment : TLeftRight
New properties
property AutoSelect :
Inherited properties and events
property AutoSize :
property BlankIfZero : Boolean
property BorderStyle :
property Color :
property ColorNeg : TColor
property ColorPos : TColor
property Ctl3D :
property Cursor :
property DragCursor :
property DragMode :
property Enabled :
property Font :
property FormatStr : String
property Height :
property HelpContext :
property HideSelection :
property Hint :
property Left :
property MaxValue : Double
property MinValue : Double
property ParentColor :
property ParentCtl3D :
property ParentShowHint :
property PopUpMenu :
property ReadOnly :
property ShowHint :
property TabOrder :
property TabStop :
property Tag :
property Top :
property Value : Double
property Visible :
property Width :
event OnChange :
event OnClick :
event OnDblClick :
event OnDragDrop :
event OnDragOver :
event OnEndDrag :
event OnEnter :
event OnExit :
event OnKeyDown :
event OnKeyPress :
event OnKeyUp :
event OnMouseDown :
event OnMouseMove :
event OnMouseUp :
blCodeChange : Boolean;
Private variables
FAlignment : TLeftRight;
Private fields
FBlankIfZero : Boolean;
The alignment for the field
FColorNeg : TColor;
Display blank if zero
FColorPos : TColor;
Color for negative text
FFormatStr : String;
Color for positive text
FMaxValue : Double;
Minimum value for field
FMinValue : Double;
Formatting string for the output text
FValue : Double;
Maximum value for field