Setting Enabled Property On Button/Form

Got a problem you cannot solve? Try here.
Post Reply
claudiug
Posts: 2
Joined: Tue Aug 10, 2010 1:19 am

Setting Enabled Property On Button/Form

Post by claudiug »

Hi,
I have some problems with setting up enabled property on the Cancel Button from the script editor. Can you tell me how can I set this from code?

My case is something like this:
- there is a form welcome with 2 buttons Cancel and Next (and this form is modal)
- When i press the next button it starts a process(exe file) that has a window form(it starts on top of the install app but I can go back to the install form - so it's not always on top/the only enabled form)
- the problem is that I have both forms enabled and I what to disable the install form(welcome) or to disable the buttons on the form(especially the Cancel button)
Also I don't want to disable the button from the start(as default).

How can I set from code the property of a button (something like CancelButton.enabled=false)

Thank you
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Setting Enabled Property On Button/Form

Post by mills »

There is currently no way to set form/control properties in code.

The best way at the time to handle this kind of situation is to create two separate forms (maybe one called formDisabled).

Perform necessary conditional checks to determine which form to present, something like:

if myVar Equals TRUE
..Display Default Form
else
.. Display Disabled Form
end
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
claudiug
Posts: 2
Joined: Tue Aug 10, 2010 1:19 am

Re: Setting Enabled Property On Button/Form

Post by claudiug »

Thank you for your reply but this doesn't solve my problem :(
I'll try this solution to see if I can do a workaround.

Have a nice day!
Post Reply