TInputQueryWizardPage入力ページ(CreateInputQueryPage関数を使用して作成されたページ)から編集ボックスを条件付きで無効または非表示にすることは可能ですか?
4つの編集ボックスがあり、前のウィザードページからの入力に基づいて、最後の2つを無効/非表示にする必要があります。どうすればいいですか?
TInputQueryWizardPage入力ページ(CreateInputQueryPage関数を使用して作成されたページ)から編集ボックスを条件付きで無効または非表示にすることは可能ですか?
4つの編集ボックスがあり、前のウィザードページからの入力に基づいて、最後の2つを無効/非表示にする必要があります。どうすればいいですか?
TInputQueryWizardPage.Edits
インデックス付きプロパティを介してそれらにアクセスできます。
[Code]
var
FirstEditIndex: Integer;
SecondEditIndex: Integer;
InputPage: TInputQueryWizardPage;
procedure InitializeWizard;
begin
InputPage := CreateInputQueryPage(wpWelcome, 'Caption', 'Dscription', 'SubCaption');
// the Add method returns the Index of the just added edit box, and
// you need to store those indexes to access the edit boxes later on
FirstEditIndex := InputPage.Add('Name:', False);
SecondEditIndex := InputPage.Add('Surname:', False);
// access the edits through the stored indexes; in your case this will
// happen in the other event, so take this script as a showcase
InputPage.Edits[FirstEditIndex].Enabled := False;
InputPage.Edits[SecondEditIndex].Visible := False;
end;