I must declare instance name in custom page with two radio buttons. I have code with this page but I don't know why I can't blocked TEdit
field when first radio button in check. I don't no how do it dynamically. And I have problem with instance in this TEdit
field because DefultDirName
don't read this text field.
var
DirPage: TWizardPage;
DirButton: TNewButton;
DirInstRadio: TNewRadioButton;
DirNoInstRadio: TRadioButton;
DirNoInstEdit: TNewEdit;
DirStrEdit: string;
procedure CreateTheWizardPages;
begin
DirPage := CreateCustomPage(wpSelectDir, 'Wybór instancji', 'Wybierz nazwę instalowanej instancji systemu ExpertWMS');
DirButton := TNewButton.Create(DirPage);
DirButton.Width := ScaleX(75);
DirButton.Height := ScaleY(23);
DirInstRadio := TNewRadioButton.Create(DirPage);
DirInstRadio.Top := DirButton.Top + DirButton.Height + ScaleY(8);
DirInstRadio.Width := DirPage.SurfaceWidth div 2;
DirInstRadio.Height := ScaleY(17);
DirInstRadio.Caption := 'Nienazwana (domyślna)';
DirInstRadio.Checked := True;
DirInstRadio.Parent := DirPage.Surface;
DirNoInstRadio := TRadioButton.Create(DirPage);
DirNoInstRadio.Top := DirInstRadio.Top + DirInstRadio.Height + ScaleY(8);
DirNoInstRadio.Width := DirPage.SurfaceWidth div 2;
DirNoInstRadio.Height := ScaleY(17);
DirNoInstRadio.Caption := 'Nazwana';
DirNoInstRadio.Checked := False;
DirNoInstRadio.Parent := DirPage.Surface;
DirNoInstEdit := TNewEdit.Create(DirPage);
DirNoInstEdit.Top := DirNoInstRadio.Top +DirNoInstRadio.Height + ScaleY(8);
DirNoInstEdit.Width := DirPage.SurfaceWidth div 2 - ScaleX(8);
DirNoInstEdit.Enabled := True;
DirNoInstEdit.Parent := DirPage.Surface;
DirStrEdit := DirNoInstEdit.Text;
end;
Function GetName
I use to transmission to DefultDirName
:
function GetName(Param: string): string;
begin
ExpandConstant(DirStrEdit);
end;