Up \Display

{@abstract(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);
  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 ReVal: TFloat read GetReVal write SetReVal;
    property ImVal: TFloat read GetImVal write SetImVal;
  end;

implementation

end.

Up \Display