Reputation: 3088
How can I put radio buttons and forms on the same Inno Setup page?
I currently have 3 fields:
I would like a radio button over the first field (Company / Name) and the third field (Customer Code).
Once a radio button is clicked, it disables the fields that aren't related to it (meaning making them a little grayish and unclickable).
So is there a way to put radio buttons and fields on the same page?
Upvotes: 1
Views: 2732
Reputation: 202282
Inno Setup is flexible enough to allow what you need. But to have such a complicated GUI, you have to program this completely, you cannot do with simple utility functions like you are using atm probably (like CreateInputQueryPage
).
You need to create:
CreateCustomPage
TRadioButton
)TRadioButton.OnClick
event and enable/disable respective forms based on selected button.For a general introduction, see Pascal Scripting: Using Custom Wizard Pages.
Though for a faster start, you can actually start with CreateInputQueryPage
, and only add your radio buttons and layout the text boxes correctly. To access individual edit boxes and their labels, use TInputQueryWizardPage.Edits
and TInputQueryWizardPage.PromptLabels
.
For some examples, see:
Upvotes: 3