Up \Display
{@abstract(Display Form)
author: Nikolai Shokhirev )
created: June 6, 2002)
last modified: August 8, 2003)
ŠNikolai V. Shokhirev, 2002-2003 }
{
RowNum Names Vector
+------+------+------+------+------+
ColNum | | | | 1 | 2 |
+------+------+------+------+------+
Headers | | | | H1 | H2 |
+------+------+------+------+------+
Values | | | | E1 | E2 |
+------+------+------+------+------+
| 1 | N1 | V1 | M11 | M12 |
+------+------+------+------+------+
| 2 | N2 | V2 | M21 | M22 |
+------+------+------+------+------+
| 3 | N3 | V3 | M31 | M32 |
+------+------+------+------+------+
N: INames; // Column of strings
V: ITensor1D; // Column-vector
H: INames; // Row of strings
E: ITensor1D; // Row-vector
M: IMatrix;
Any combinations of [diMatrix, diNames, diRowNum, diColNum, diValues, diVector,diHeaders]
are valid under the condition that at least one of [diMatrix, diValues, diVector] is presented.
The button "M" (for Editing = true) is used for recordung modification to arrays.
Display format
Width - total length of a number for Matrix, Vector and Values
Decimals - number of decimal digits for Matrix
V-Decimals - number of decimal digits for Vector and Values
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 := 8;
seD.Value := 4;
seDV.Value := 5;
All othe form properties can be set as well:
Caption := ' Vector';
Width := 300;
Height := 200;
}
unit fDisplay;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Grids, StdCtrls, Spin, Buttons, ExtCtrls, uMatTypes, uTensors;
type
TDisplayItem =
(diMatrix, diNames, diRowNum, diColNum, diValues, diVector, diHeaders);
TDisplaySet = set of TDisplayItem;
TFormDisplay = class(TForm)
PanelTop: TPanel;
LabelW: TLabel;
LabelD: TLabel;
ButtonMem: TSpeedButton;
seD: TSpinEdit;
seW: TSpinEdit;
PanelBottom: TPanel;
SG: TStringGrid;
seDV: TSpinEdit;
LabelDV: TLabel;
procedure FormResize(Sender: TObject);
procedure seWChange(Sender: TObject);
procedure seDChange(Sender: TObject);
procedure seDVChange(Sender: TObject);
procedure ButtonMemClick(Sender: TObject);
public
{ Public declarations }
procedure Display;
property Editing: boolean read GetEditing write SetEditing;
property DisplSet: TDisplaySet read GetDisplSet write SetDisplSet;
property Names: INames write SetNames;
property Headers: INames write SetHeaders;
property Vector: ITensor1D write SetVector;
property Values: ITensor1D write SetValues;
property Matrix: ITensor2D write SetMatrix;
property ImMatrix: ITensor2D write SetImMatrix;
property CMatrix: boolean read fCMatrix write fCMatrix;
end;
var
FormDisplay: TFormDisplay;
implementation
end.