{Display complex format form)
author: Nikolai Shokhirev )
created: (June 6, 2002)
last modified: August 8, 2003)
ŠNikolai V. Shokhirev, 2002-2003 }
{
Display complex format
Width - total length of a number for Real and Integer
Decimals - number of decimal digits for Real
The numbers are displayed in the Scientific notation if Decimals < 0
Default values for Width and Decimals can be set before call for ShowModal
seW.Value := 14;
seD.Value := -1;
The modified value is saved in ReVal (TFloat), ImVal (TInt) or sVal (string).
ArrayName, Idx1 and Idx2 are used only in the caption and may not be set at all
}
unit fDisplayCVal;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Spin, uMatTypes;
type
// TDisplayType = (dtReal, dtInt, dtStr);
TFDisplCVal = class(TForm)
LabelArray: TLabel;
EditValue: TEdit;
LabelW: TLabel;
LabelD: TLabel;
seW: TSpinEdit;
seD: TSpinEdit;
procedure seWChange(Sender: TObject);
procedure seDChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
// dt: TDisplayType;
fReVal: TFloat;
fImVal: TFloat;
fsVal: string;
fArrayName: string;
fIdx1: TInt;
fIdx2: TInt;
// function GetDisplType: TDisplayType;
function GetImVal: TFloat;
function GetReVal: TFloat;
// function GetsVal: string;
// procedure SetDisplType(const Value: TDisplayType);
procedure SetImVal(const Value: TFloat);
procedure SetReVal(const Value: TFloat);
// procedure SetsVal(const Value: string);
function GetIdx1: TInt;
function GetIdx2: TInt;
procedure SetIdx1(const Value: TInt);
procedure SetIdx2(const Value: TInt);
function GetArrayName: string;
procedure SetArrayName(const Value: string);
public
{ Public declarations }
procedure Display;
procedure Save;
property ArrayName: string read GetArrayName write SetArrayName;
property Idx1: TInt read GetIdx1 write SetIdx1;
property Idx2: TInt read GetIdx2 write SetIdx2;
// property DisplType: TDisplayType read GetDisplType write SetDisplType;
property ReVal: TFloat read GetReVal write SetReVal;
property ImVal: TFloat read GetImVal write SetImVal;
// property sVal: string read GetsVal write SetsVal;
end;
var
FDisplCVal: TFDisplCVal;
implementation
uses
uDisplay;
{$R *.DFM}
end.
Top
Generated by Lore's Source to HTML Converter(http://www.newty.de/lsc/index.html)