0

I am customizing one of the Wizard Pages to add a few check boxes. I am adding the checkbox by calling DesiredPageId := PageFromID(<wpXXX>) and specifying ChkBox.Parent := DesiredPageId. Now, is there a way to access the state of such a check box in NextButtonClick() without having the checkbox control as global ?

I do see examples like the following but in those cases the control (Radio button / Checkbox) is global and hence accessible anywhere.

  1. Get radio button value [INNO SETUP]
  2. How can I add a CheckBox for optional files during install? (innosetup)

One way could be to associate an OnClick function in which a state variable is updated (again, global) and the same is accessed in NextButtonClick(). Is there any other solution ?

Anand
  • 473
  • 3
  • 14
  • What is wrong about using a global variable? If it limits you anyhow, you have to explain how and why. – Martin Prikryl Aug 12 '17 at 16:25
  • In general, global variables make it a bit difficult to follow the code -- it can be read from / written to by any function and hence I try to avoid it as much as possible. – Anand Aug 14 '17 at 07:58

0 Answers0