Up \Display

{@abstract(Display format form)
author: Nikolai Shokhirev )
created: June 6, 2002)
last modified: August 8, 2003)
ŠNikolai V. Shokhirev, 2002-2003 }
{
Display 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 rVal (TFloat), iVal (TInt) or sVal (string).

  ArrayName, Idx1 and Idx2 are used only in the caption and may not be set at all
}

unit fDisplayVal;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Spin, uMatTypes;

type

  TDisplayType = (dtReal, dtInt, dtStr);

  TFDisplVal = 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 DisplType: TDisplayType read GetDisplType write SetDisplType;
    property rVal: TFloat read GetrVal write SetrVal;
    property iVal: TInt read GetiVal write SetiVal;
    property sVal: string read GetsVal write SetsVal;
  end;

implementation


end.

Up \Display