Problem wehn selecting radio buttons - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Problem wehn selecting radio buttons

I have a dialog with two radio buttons on it one is set to True on entry the other false.

If I click rb2 then I want an edit box to display the default number for that selection which is 55.
Then if I click rb1 I want this same edit box to be <blank>.

I have put init events in which gives me the desired effect with the first button selected i.e. a blank string. However, when I click rb2 nothing changes, which means that the controls are not refreshed
/ reinitilaised on the dialog. How can I achieve this please?

Reagards,
John
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Problem wehn selecting radio buttons

Hello John,

Unfortunately, you cannot achieve this using radio buttons controls. In order to achieve what you want you should use two check boxes controls which will simulate a radio buttons functionality.

Please keep in mind that in order to perform an action on UI controls you should use a published event attached to control, if the related control supports published events.

I've attached a sample project which implements your scenario, using check boxes instead of radio buttons controls, on the "NewDialog" from the "First Time Install" dialogs tree.
Sample.aip
(18.52 KiB) Downloaded 515 times
All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Re: Problem wehn selecting radio buttons

Thanks, I Changed radio buttons to check boxes.

I have tests on the edit box that says if you check the first one it hides and the second one it is visible.

If I alternate between these checkboxes quickly when i deselect (uncheck) the first checkbox it does not seem to fire an event so that the text box becomes visible.

I.e. the sequence coming in is the first box checked, second box unchecked, edit box invisible.

check the second box = edit box visible, uncheck the second box = edit box invisible, first checkbox checked.

uncheck the first checkbox = oops no edit box visible, second checkbox checked.

Doing my head in.

Raegrdsm
John
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Problem wehn selecting radio buttons

Hello John,
I.e. the sequence coming in is the first box checked, second box unchecked, edit box invisible.
check the second box = edit box visible, uncheck the second box = edit box invisible, first checkbox checked.

I've attached a sample project which implements your scenario, on the "NewDialog" from the "First Time Install" dialogs tree.
sample.aip
(19.02 KiB) Downloaded 581 times

If this is not what you need, please give us more details about the behavior you want to achieve.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Re: Problem wehn selecting radio buttons

Thanks Daniel,

I was using <>"True" instead of ="" on the edit control, which when I changed it had the desired effect. I don;t know why.

Regards,
John
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Problem wehn selecting radio buttons

Hi John,

Please note that the value of a property attached with a checkbox does not have a boolean value, as it would be in a programming language, but it is simply set or not to a string
that you can specify.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”