Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

how to respond to checkbox event?


3 replies to this topic

shahedC

shahedC
  • Members
  • 8 posts

Posted 28 December 2004 - 19:45

I have a dialog with a license agreement, a checkbox and 2 buttons below it:
[Back] | [Yes] | [No]

The [Yes] button is disabled at first and needs to be enabled when the user checks the checkbox, indicating that he has agreed to the terms and conditions.

How do I enable/disable the [Yes] button based on the click event on the checkbox?


FYI, I have an InstallScript MSI project. I found an article that talks about this:
http://www.installsh...icles/check.asp
But this only applies to Basic MSI projects, and I can't see to do the same thing to my InstallScript MSI project.

shahedC

shahedC
  • Members
  • 8 posts

Posted 29 December 2004 - 18:44

I was able to solve this problem by defining a custom dialog using EzDefineDialog() and lanching it using WaitOnDialog().

I checked the return value of WaitOnDialog repeatedly in a loop to respond to events of its controls (radio buttons, push buttons, etc)

My dialog box now looks like this:

[ License Agreement text]
o I agree
o I disagree
[Back] [Next] [Cancel]

Now, it works as I want it to, but I would like to have the "I agree" radio button selected as a default.

How do I select a radio button as a default? I looked through all the properties. but couldn't find anything.

UPDATE: Ok, I just found out that CtrlSetState() can be used to check a radio button, so this works for me.

Edited by shahedC, 29 December 2004 - 18:56.


shahedC

shahedC
  • Members
  • 8 posts

Posted 29 December 2004 - 18:46

Also, I would like to have the Next button disabled until the user clicks I agree.

How do I disable and enable pushbuttons programatically through InstallScript?

I tried looking through the documentation, but it seems that you can only call ENABLE() and DISABLE() for automatically generated buttons on non-custom dialogs.

vishnub

vishnub
  • Full Members
  • 63 posts

Posted 03 January 2005 - 08:19

Hi Shahid,

For your 1st question, that is how to make a radio button selected by default. u can specify the value of the radio button which u want to be selected as default in the radio button group's property value in the Property Manager view.

Or another approach, is through script. U r using WaitOnDialog(), in that use CtrlSetState() to select a radio button as default.

I hope u can achieve what u want through any of the above approaches.


Regards,
Vishnu
smile.gif