2020-03-30 18:01:44 +00:00
|
|
|
// Use file "SchoolsData.laz" for testing
|
|
|
|
|
|
|
|
unit XvsMultYUnit;
|
|
|
|
|
2020-08-22 22:23:20 +00:00
|
|
|
{$MODE objfpc}{$H+}
|
2020-03-30 18:01:44 +00:00
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
2020-08-22 22:23:20 +00:00
|
|
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
2020-09-22 13:20:08 +00:00
|
|
|
StdCtrls, Buttons, ExtCtrls, Printers, ComCtrls,
|
|
|
|
MainUnit, Globals, ContextHelpUnit, DataProcs, MatrixLib,
|
|
|
|
ReportFrameUnit, ChartFrameUnit;
|
2020-03-30 18:01:44 +00:00
|
|
|
|
|
|
|
type
|
|
|
|
|
|
|
|
{ TXvsMultYForm }
|
|
|
|
|
|
|
|
TXvsMultYForm = class(TForm)
|
|
|
|
Bevel2: TBevel;
|
|
|
|
LinesBox: TCheckBox;
|
|
|
|
GroupBox1: TGroupBox;
|
2020-09-22 13:20:08 +00:00
|
|
|
PageControl1: TPageControl;
|
2020-03-30 18:01:44 +00:00
|
|
|
Panel1: TPanel;
|
2020-09-22 13:20:08 +00:00
|
|
|
ParamsPanel: TPanel;
|
2020-03-30 18:01:44 +00:00
|
|
|
ResetBtn: TButton;
|
|
|
|
ComputeBtn: TButton;
|
|
|
|
CloseBtn: TButton;
|
|
|
|
PlotTitleEdit: TEdit;
|
|
|
|
Label4: TLabel;
|
2020-09-22 10:42:22 +00:00
|
|
|
HelpBtn: TButton;
|
2020-09-22 13:20:08 +00:00
|
|
|
ParamsSplitter: TSplitter;
|
|
|
|
ReportPage: TTabSheet;
|
|
|
|
ChartPage: TTabSheet;
|
2020-03-30 18:01:44 +00:00
|
|
|
YBox: TListBox;
|
|
|
|
XEdit: TEdit;
|
|
|
|
Label2: TLabel;
|
|
|
|
Label3: TLabel;
|
|
|
|
XInBtn: TBitBtn;
|
|
|
|
YInBtn: TBitBtn;
|
|
|
|
Label1: TLabel;
|
|
|
|
XOutBtn: TBitBtn;
|
|
|
|
YOutBtn: TBitBtn;
|
|
|
|
VarList: TListBox;
|
2020-09-20 20:37:17 +00:00
|
|
|
procedure CloseBtnClick(Sender: TObject);
|
2020-03-30 18:01:44 +00:00
|
|
|
procedure ComputeBtnClick(Sender: TObject);
|
|
|
|
procedure FormActivate(Sender: TObject);
|
|
|
|
procedure FormCreate(Sender: TObject);
|
2020-09-22 10:42:22 +00:00
|
|
|
procedure HelpBtnClick(Sender: TObject);
|
2020-03-30 18:01:44 +00:00
|
|
|
procedure ResetBtnClick(Sender: TObject);
|
2020-09-22 13:20:08 +00:00
|
|
|
procedure VarListDblClick(Sender: TObject);
|
2020-03-30 18:01:44 +00:00
|
|
|
procedure VarListSelectionChange(Sender: TObject; User: boolean);
|
|
|
|
procedure XInBtnClick(Sender: TObject);
|
|
|
|
procedure XOutBtnClick(Sender: TObject);
|
|
|
|
procedure YInBtnClick(Sender: TObject);
|
|
|
|
procedure YOutBtnClick(Sender: TObject);
|
|
|
|
private
|
|
|
|
{ private declarations }
|
2020-09-22 13:20:08 +00:00
|
|
|
FReportFrame: TReportFrame;
|
|
|
|
FChartFrame: TChartFrame;
|
2020-03-30 18:01:44 +00:00
|
|
|
FAutoSized: Boolean;
|
|
|
|
selected: IntDyneVec;
|
2020-08-22 22:23:20 +00:00
|
|
|
procedure PlotXY(XValues: DblDyneVec; YValues: DblDyneMat);
|
2020-03-30 18:01:44 +00:00
|
|
|
procedure UpdateBtnStates;
|
|
|
|
public
|
|
|
|
{ public declarations }
|
2020-09-20 14:15:41 +00:00
|
|
|
procedure Reset;
|
2020-03-30 18:01:44 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
var
|
|
|
|
XvsMultYForm: TXvsMultYForm;
|
|
|
|
|
2020-09-22 13:20:08 +00:00
|
|
|
|
2020-03-30 18:01:44 +00:00
|
|
|
implementation
|
|
|
|
|
2020-08-22 22:23:20 +00:00
|
|
|
{$R *.lfm}
|
|
|
|
|
2020-03-30 18:01:44 +00:00
|
|
|
uses
|
2020-08-22 22:23:20 +00:00
|
|
|
TAChartUtils,
|
2020-04-13 21:59:05 +00:00
|
|
|
Math, Utils;
|
2020-03-30 18:01:44 +00:00
|
|
|
|
2020-09-22 13:20:08 +00:00
|
|
|
|
2020-03-30 18:01:44 +00:00
|
|
|
{ TXvsMultYForm }
|
|
|
|
|
2020-09-22 13:20:08 +00:00
|
|
|
procedure TXvsMultYForm.CloseBtnClick(Sender: TObject);
|
2020-03-30 18:01:44 +00:00
|
|
|
begin
|
2020-09-22 13:20:08 +00:00
|
|
|
Close;
|
2020-03-30 18:01:44 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TXvsMultYForm.ComputeBtnClick(Sender: TObject);
|
|
|
|
var
|
2020-09-22 13:20:08 +00:00
|
|
|
i, j, N, NoY, XCol, NoSelected: integer;
|
2020-08-22 22:23:20 +00:00
|
|
|
MinX, MaxX, MinY, MaxY: double;
|
2020-03-30 18:01:44 +00:00
|
|
|
Title: string;
|
2020-08-22 22:23:20 +00:00
|
|
|
RMatrix: DblDyneMat = nil;
|
|
|
|
XValues: DblDyneVec = nil;
|
|
|
|
YValues: DblDyneMat = nil;
|
|
|
|
Means: DblDyneVec = nil;
|
|
|
|
Variances: DblDyneVec = nil;
|
|
|
|
StdDevs: DblDyneVec = nil;
|
|
|
|
RowLabels: StrDyneVec = nil;
|
|
|
|
ColLabels: StrDyneVec = nil;
|
2020-03-30 18:01:44 +00:00
|
|
|
errorcode: boolean = false;
|
|
|
|
Ncases: integer = 0;
|
2020-08-22 22:23:20 +00:00
|
|
|
lReport: TStrings;
|
2020-03-30 18:01:44 +00:00
|
|
|
begin
|
|
|
|
if XEdit.Text = '' then
|
|
|
|
begin
|
2020-08-22 22:23:20 +00:00
|
|
|
ErrorMsg('No X variable selected.');
|
2020-03-30 18:01:44 +00:00
|
|
|
exit;
|
|
|
|
end;
|
|
|
|
|
|
|
|
if YBox.Items.Count = 0 then
|
|
|
|
begin
|
2020-08-22 22:23:20 +00:00
|
|
|
ErrorMsg('No Y variables selected.');
|
2020-03-30 18:01:44 +00:00
|
|
|
exit;
|
|
|
|
end;
|
|
|
|
|
2020-08-22 22:23:20 +00:00
|
|
|
MaxX := -Infinity;
|
|
|
|
MinX := Infinity;
|
|
|
|
MaxY := -Infinity;
|
|
|
|
MinY := Infinity;
|
2020-03-30 18:01:44 +00:00
|
|
|
NoY := YBox.Items.Count;
|
|
|
|
|
|
|
|
SetLength(selected, NoY + 1);
|
2020-08-22 22:23:20 +00:00
|
|
|
SetLength(RowLabels, NoVariables);
|
|
|
|
SetLength(ColLabels, NoVariables);
|
2020-03-30 18:01:44 +00:00
|
|
|
|
|
|
|
XCol := 0;
|
|
|
|
for i := 1 to NoVariables do
|
|
|
|
if Trim(XEdit.Text) = Trim(OS3MainFrm.DataGrid.Cells[i,0]) then
|
|
|
|
begin
|
|
|
|
XCol := i;
|
|
|
|
break;
|
|
|
|
end;
|
|
|
|
|
|
|
|
for j := 0 to NoY-1 do
|
|
|
|
begin
|
|
|
|
selected[j] := 0;
|
|
|
|
for i := 1 to NoVariables do
|
2020-08-22 22:23:20 +00:00
|
|
|
if Trim(YBox.Items[j]) = Trim(OS3MainFrm.DataGrid.Cells[i,0]) then
|
2020-03-30 18:01:44 +00:00
|
|
|
begin
|
|
|
|
selected[j] := i;
|
|
|
|
Break;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
selected[NoY] := XCol;
|
|
|
|
NoSelected := NoY + 1;
|
|
|
|
for i := 0 to NoSelected-1 do
|
|
|
|
begin
|
|
|
|
RowLabels[i] := Trim(OS3MainFrm.DataGrid.Cells[selected[i],0]);
|
|
|
|
ColLabels[i] := RowLabels[i];
|
|
|
|
end;
|
|
|
|
|
|
|
|
Caption := RowLabels[0] + ' ' + RowLabels[1];
|
|
|
|
|
|
|
|
lReport := TStringList.Create;
|
|
|
|
try
|
2020-08-22 22:23:20 +00:00
|
|
|
SetLength(YValues, NoY, NoCases);
|
|
|
|
SetLength(XValues, NoCases);
|
2020-08-23 09:15:08 +00:00
|
|
|
SetLength(Means, NoSelected);
|
|
|
|
SetLength(Variances, NoSelected);
|
|
|
|
SetLength(StdDevs, NoSelected);
|
2020-03-30 18:01:44 +00:00
|
|
|
SetLength(RMatrix, NoSelected+1, NoSelected+1);
|
2020-08-23 09:15:08 +00:00
|
|
|
SetLength(selected, NoVariables+1);
|
2020-03-30 18:01:44 +00:00
|
|
|
|
|
|
|
for i := 0 to NoSelected - 1 do
|
|
|
|
begin
|
|
|
|
Means[i] := 0.0;
|
|
|
|
StdDevs[i] := 0.0;
|
|
|
|
for j := 0 to NoSelected-1 do RMatrix[i,j] := 0.0;
|
|
|
|
end;
|
|
|
|
|
2020-08-22 22:23:20 +00:00
|
|
|
N := 0;
|
2020-08-23 09:15:08 +00:00
|
|
|
// index rule: array index: i, grid-related index: i+1
|
|
|
|
for i := 0 to NoCases-1 do
|
2020-03-30 18:01:44 +00:00
|
|
|
begin
|
2020-08-23 09:15:08 +00:00
|
|
|
if not GoodRecord(i+1, NoSelected, selected) then continue;
|
2020-08-22 22:23:20 +00:00
|
|
|
inc(N);
|
2020-08-23 09:15:08 +00:00
|
|
|
XValues[i] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[XCol, i+1]));
|
|
|
|
MaxX := Max(MaxX, XValues[i]);
|
|
|
|
MinX := Min(MinX, XValues[i]);
|
2020-03-30 18:01:44 +00:00
|
|
|
for j := 0 to NoY - 1 do
|
|
|
|
begin
|
2020-08-23 09:15:08 +00:00
|
|
|
// Unlike other usages of 2-D arrays in LazStats the 1st index is the
|
|
|
|
// curve index while the 2nd index is the point index here.
|
|
|
|
YValues[j, i] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[selected[j], i+1]));
|
|
|
|
MaxY := Max(MaxY, YValues[j, i]);
|
|
|
|
MinY := Min(MinY, YValues[j, i]);
|
2020-03-30 18:01:44 +00:00
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
// get descriptive data
|
2020-09-22 13:20:08 +00:00
|
|
|
lReport.Add('X VERSUS MULTIPLE Y VALUES PLOT');
|
|
|
|
lReport.Add('');
|
|
|
|
|
|
|
|
Correlations(NoSelected,selected,RMatrix,Means,Variances,StdDevs,errorcode,Ncases);
|
|
|
|
//N := Ncases;
|
|
|
|
Title := 'CORRELATIONS';
|
|
|
|
MatPrint(RMatrix, NoSelected, NoSelected, Title, RowLabels, ColLabels, N, lReport);
|
|
|
|
Title := 'Means';
|
|
|
|
DynVectorPrint(Means, NoSelected, Title, RowLabels, N, lReport);
|
|
|
|
Title := 'Variances';
|
|
|
|
DynVectorPrint(Variances, NoSelected, Title, RowLabels, N, lReport);
|
|
|
|
Title := 'Standard Deviations';
|
|
|
|
DynVectorPrint(StdDevs, NoSelected, Title, RowLabels, N, lReport);
|
|
|
|
|
|
|
|
FReportFrame.DisplayReport(lReport);
|
2020-03-30 18:01:44 +00:00
|
|
|
|
2020-08-22 22:23:20 +00:00
|
|
|
// Sort on X
|
|
|
|
SortOnX(XValues, YValues);
|
2020-03-30 18:01:44 +00:00
|
|
|
|
2020-08-22 22:23:20 +00:00
|
|
|
// Plot x vs multiple y
|
2020-09-22 13:20:08 +00:00
|
|
|
PlotXY(XValues, YValues);
|
2020-03-30 18:01:44 +00:00
|
|
|
|
|
|
|
finally
|
|
|
|
lReport.Free;
|
|
|
|
RMatrix := nil;
|
|
|
|
StdDevs := nil;
|
|
|
|
Variances := nil;
|
|
|
|
Means := nil;
|
|
|
|
XValues := nil;
|
|
|
|
YValues := nil;
|
|
|
|
selected := nil;
|
|
|
|
ColLabels := nil;
|
|
|
|
RowLabels := nil;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
2020-08-22 22:23:20 +00:00
|
|
|
|
2020-03-30 18:01:44 +00:00
|
|
|
procedure TXvsMultYForm.FormActivate(Sender: TObject);
|
|
|
|
var
|
|
|
|
w: Integer;
|
|
|
|
begin
|
|
|
|
if FAutoSized then
|
|
|
|
exit;
|
|
|
|
|
2020-09-22 10:42:22 +00:00
|
|
|
w := MaxValue([HelpBtn.Width, ResetBtn.Width, ComputeBtn.Width, CloseBtn.Width]);
|
|
|
|
HelpBtn.Constraints.MinWidth := w;
|
2020-03-30 18:01:44 +00:00
|
|
|
ResetBtn.Constraints.MinWidth := w;
|
|
|
|
ComputeBtn.Constraints.MinWidth := w;
|
|
|
|
CloseBtn.Constraints.MinWidth := w;
|
|
|
|
|
2020-09-22 13:20:08 +00:00
|
|
|
Panel1.Constraints.MinHeight := YOutBtn.Top + YOutBtn.Height;
|
|
|
|
ParamsPanel.Constraints.MinWidth := 4*w + 3*CloseBtn.BorderSpacing.Left;
|
|
|
|
ParamsPanel.Constraints.MinHeight := Panel1.Constraints.MinHeight + Panel1.BorderSpacing.Bottom +
|
|
|
|
PlotTitleEdit.Height + GroupBox1.Height + 2*GroupBox1.BorderSpacing.Top +
|
|
|
|
Bevel2.Height + CloseBtn.Height + CloseBtn.BorderSpacing.Top;
|
|
|
|
|
|
|
|
Constraints.MinHeight := ParamsPanel.Constraints.MinHeight + 2*ParamsPanel.BorderSpacing.Top;
|
|
|
|
Constraints.MinWidth := ParamsPanel.Constraints.MinWidth + 200;
|
|
|
|
if Height < Constraints.MinHeight then Height := 1; // enforce autosizing if needed
|
|
|
|
if Width < Constraints.MinWidth then Width :=1;
|
2020-03-30 18:01:44 +00:00
|
|
|
|
2020-09-20 20:37:17 +00:00
|
|
|
Position := poDesigned;
|
2020-03-30 18:01:44 +00:00
|
|
|
FAutoSized := true;
|
|
|
|
end;
|
|
|
|
|
2020-08-22 22:23:20 +00:00
|
|
|
|
2020-03-30 18:01:44 +00:00
|
|
|
procedure TXvsMultYForm.FormCreate(Sender: TObject);
|
|
|
|
begin
|
|
|
|
Assert(OS3MainFrm <> nil);
|
2020-09-22 13:20:08 +00:00
|
|
|
|
2020-09-23 11:19:08 +00:00
|
|
|
InitForm(self);
|
2020-09-22 13:20:08 +00:00
|
|
|
|
|
|
|
FReportFrame := TReportFrame.Create(self);
|
|
|
|
FReportFrame.Parent := ReportPage;
|
|
|
|
FReportFrame.Align := alClient;
|
|
|
|
|
|
|
|
FChartFrame := TChartFrame.Create(self);
|
|
|
|
FChartFrame.Parent := ChartPage;
|
|
|
|
FChartFrame.Align := alClient;
|
|
|
|
FChartFrame.Chart.BottomAxis.Intervals.MaxLength := 80;
|
|
|
|
FChartFrame.Chart.BottomAxis.Intervals.MinLength := 30;
|
|
|
|
|
2020-09-20 14:15:41 +00:00
|
|
|
Reset;
|
2020-03-30 18:01:44 +00:00
|
|
|
end;
|
|
|
|
|
2020-08-22 22:23:20 +00:00
|
|
|
|
2020-09-22 10:42:22 +00:00
|
|
|
procedure TXvsMultYForm.HelpBtnClick(Sender: TObject);
|
|
|
|
begin
|
|
|
|
if ContextHelpForm = nil then
|
|
|
|
Application.CreateForm(TContextHelpForm, ContextHelpForm);
|
|
|
|
ContextHelpForm.HelpMessage((Sender as TButton).Tag);
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
2020-09-22 13:20:08 +00:00
|
|
|
// Routine to plot X versus multiple Y values
|
|
|
|
// Unlike many other routines in LazStats the curve index in YValues is the
|
|
|
|
// first one, the point index is the second one.
|
|
|
|
procedure TXvsMultYForm.PlotXY(XValues: DblDyneVec; YValues: DblDyneMat);
|
|
|
|
var
|
|
|
|
N, Ny, Nc: Integer;
|
|
|
|
j: Integer;
|
|
|
|
pt: TPlotType;
|
|
|
|
begin
|
|
|
|
// Preparations
|
|
|
|
if LinesBox.Checked then pt := ptLinesAndSymbols else pt := ptSymbols;
|
|
|
|
|
|
|
|
N := Length(XValues);
|
|
|
|
Ny := Length(YValues);
|
|
|
|
Nc := Length(DATA_COLORS);
|
|
|
|
|
|
|
|
FChartFrame.Clear;
|
|
|
|
|
|
|
|
// Titles
|
|
|
|
FChartFrame.SetTitle(PlotTitleEdit.Text);
|
|
|
|
FChartFrame.SetXTitle(XEdit.Text);
|
|
|
|
FChartFrame.SetYTitle('Y Values');
|
|
|
|
|
|
|
|
// Plot a series for each y value
|
|
|
|
for j := 0 to Ny - 1 do
|
|
|
|
FChartFrame.PlotXY(pt, XValues, YValues[j], nil, nil, Trim(YBox.Items[j]), DATA_COLORS[j mod Nc]);
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TXvsMultYForm.Reset;
|
|
|
|
var
|
|
|
|
i: integer;
|
|
|
|
begin
|
|
|
|
VarList.Clear;
|
|
|
|
YBox.Clear;
|
|
|
|
XEdit.Clear;
|
|
|
|
XInBtn.Enabled := true;
|
|
|
|
XOutBtn.Enabled := false;
|
|
|
|
YInBtn.Enabled := true;
|
|
|
|
YOutBtn.Enabled := false;
|
|
|
|
PlotTitleEdit.Text := '';
|
|
|
|
for i := 1 to NoVariables do
|
|
|
|
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TXvsMultYForm.ResetBtnClick(Sender: TObject);
|
|
|
|
begin
|
|
|
|
Reset;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TXvsMultYForm.UpdateBtnStates;
|
|
|
|
var
|
|
|
|
lSelected: Boolean;
|
|
|
|
begin
|
|
|
|
lSelected := AnySelected(VarList);
|
|
|
|
XInBtn.Enabled := lSelected and (XEdit.Text = '');
|
|
|
|
YInBtn.Enabled := lSelected;
|
|
|
|
xOutBtn.Enabled := (XEdit.Text <> '');
|
|
|
|
YOutBtn.Enabled := AnySelected(YBox);
|
|
|
|
|
|
|
|
FReportFrame.UpdateBtnStates;
|
|
|
|
FChartFrame.UpdateBtnStates;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TXvsMultYForm.VarListDblClick(Sender: TObject);
|
|
|
|
var
|
|
|
|
index: integer;
|
|
|
|
begin
|
|
|
|
index := VarList.ItemIndex;
|
|
|
|
if index > -1 then
|
|
|
|
begin
|
|
|
|
if XEdit.Text = '' then
|
|
|
|
XEdit.Text := VarList.Items[index]
|
|
|
|
else
|
|
|
|
YBox.Items.Add(VarList.Items[index]);
|
|
|
|
VarList.Items.Delete(index);
|
|
|
|
UpdateBtnStates;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TXvsMultYForm.VarListSelectionChange(Sender: TObject; User: boolean);
|
|
|
|
begin
|
|
|
|
UpdateBtnStates;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
2020-03-30 18:01:44 +00:00
|
|
|
procedure TXvsMultYForm.XInBtnClick(Sender: TObject);
|
|
|
|
var
|
|
|
|
index: integer;
|
|
|
|
begin
|
|
|
|
index := VarList.ItemIndex;
|
|
|
|
if (index > -1) and (XEdit.Text = '') then
|
|
|
|
begin
|
|
|
|
XEdit.Text := VarList.Items[index];
|
|
|
|
VarList.Items.Delete(index);
|
|
|
|
end;
|
|
|
|
UpdateBtnStates;
|
|
|
|
end;
|
|
|
|
|
2020-08-22 22:23:20 +00:00
|
|
|
|
2020-03-30 18:01:44 +00:00
|
|
|
procedure TXvsMultYForm.XOutBtnClick(Sender: TObject);
|
|
|
|
begin
|
|
|
|
if (XEdit.Text <> '') then
|
|
|
|
begin
|
|
|
|
VarList.Items.Add(XEdit.Text);
|
|
|
|
XEdit.Text := '';
|
|
|
|
end;
|
|
|
|
UpdateBtnStates;
|
|
|
|
end;
|
|
|
|
|
2020-08-22 22:23:20 +00:00
|
|
|
|
2020-03-30 18:01:44 +00:00
|
|
|
procedure TXvsMultYForm.YInBtnClick(Sender: TObject);
|
|
|
|
var
|
|
|
|
i: integer;
|
|
|
|
begin
|
|
|
|
i := 0;
|
|
|
|
while i < VarList.Items.Count do
|
|
|
|
begin
|
|
|
|
if VarList.Selected[i] then
|
|
|
|
begin
|
|
|
|
YBox.Items.Add(VarList.Items[i]);
|
|
|
|
VarList.Items.Delete(i);
|
|
|
|
i := 0;
|
|
|
|
end else
|
|
|
|
inc(i);
|
|
|
|
end;
|
|
|
|
UpdateBtnStates;
|
|
|
|
end;
|
|
|
|
|
2020-08-22 22:23:20 +00:00
|
|
|
|
2020-03-30 18:01:44 +00:00
|
|
|
procedure TXvsMultYForm.YOutBtnClick(Sender: TObject);
|
|
|
|
var
|
|
|
|
i: integer;
|
|
|
|
begin
|
|
|
|
i := 0;
|
|
|
|
while i < YBox.Items.Count do
|
|
|
|
begin
|
|
|
|
if (YBox.Selected[i]) then
|
|
|
|
begin
|
|
|
|
VarList.Items.Add(YBox.Items[i]);
|
|
|
|
YBox.Items.Delete(i);
|
|
|
|
i := 0;
|
|
|
|
end else
|
|
|
|
i := i + 1;
|
|
|
|
end;
|
|
|
|
UpdateBtnStates;
|
|
|
|
end;
|
|
|
|
|
2020-08-22 22:23:20 +00:00
|
|
|
|
2020-03-30 18:01:44 +00:00
|
|
|
end.
|
|
|
|
|