I added an InputOptionWizardPage for selecting tasks. This works fine, but I would like to add some custom functionality. One task is dependent on the other, so if the second checkbox is checked, the first should be checked and grayed out.
To do this, I need to access the properties of a checkbox. I found ways to do this using a completely custom page, where I would explicitly create the checkbox myself, but that would be a lot of work, since most of what I have so far is satisfactory.
How can I hook a checkbox that was created by Inno Setup, using MyInputOptionWizardPage.Add('This will add a checkbox with this caption')
?
You can also control tasks by parent relationships, it gives you a similar behavior to what your asking for but is not 100% the same. I know this does not answer your question directly, but intends to give you an option that maybe easier to implement. Doing it this way you don't have to worry about managing a custom dialog at all.
In attempt to answer your question directly.
I suspect you have used
CreateInputOptionPage()
which returns aTInputOptionWizardPage
This has the '.Add('Example')` method that you mention.
TInputOptionWizard
descendsTWizardPage
which descends fromTComponent
which has the methods you need.Update: Replaced original Code, this example is based on a review of options available in the InnoSetup source code of ScriptClasses_C.pas My original example I thought that
TRadioButton
andTCheckBox
where individual controls. They instead its one control calledTNewCheckListBox
. There is a couple of ways someone could pull this off but the safest way is to use.This example is a complete Inno Setup Script.