cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kmoulton
Level 6

How do you preselect a Radio Button in the suite wizard?

I have a group of radio buttons. All the radio buttons are associated with one particular property. Each radio button is bound to the property. For example, PROP==RadioButton1, PROP==RadioButton2 , and etc. That way when the user selects the radio button, the property returns a specific value.

Is there a way to set the property before hand such that a specific radio button is selected?

Thanks,

--Kim
Labels (1)
0 Kudos
(5) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

You should be able to set a property's value in the property manager view.

Note that if the radio buttons are the first tab stop on the dialog (for example, the first non-label), the initial visit to the dialog may "click" the first radio button, resetting the property. I know we added a code-based workaround for that behavior of Windows radio button controls, but I think it may have been added for InstallShield 2014.
0 Kudos
kmoulton
Level 6

The property associated with the group box is INDUSTRY_TYPE.

INDUSTRY_TYPE is set to
Electrical
in the Property Manager.

Here is my Group Box on my IndustryType dialog:



I am unable to get the radio button group to accept a change to the INDUSTRY_TYPE property. It appears to reset the property.

From the log you can see the following:

I click the next button from the ProductRegistration dialog (the dialog preceding the IndustryType dialog).

8-28-2014[09:00:44 AM]: Engine: property 'ISCurrentPage' value now 'ProductRegistration'
8-28-2014[09:00:45 AM]: UI DLL: Executing Actions on IDS_NEXT_BUTTON.Click
8-28-2014[09:00:45 AM]: UI DLL: Executing action .


Some type of group validation resets the property INDUSTRY_TYPE that is bound to each radiobutton. Contractor is the first radiobutton.

8-28-2014[09:00:45 AM]: UI DLL: Executing user validation > (Group)
8-28-2014[09:00:45 AM]: Engine: property 'INDUSTRY_TYPE:valid' value now ''
8-28-2014[09:00:45 AM]: Engine: property 'INDUSTRY_TYPE' value now 'Contractor'
8-28-2014[09:00:45 AM]: Engine: property 'INDUSTRY_TYPE' value now ''
8-28-2014[09:00:45 AM]: UI DLL: Executing user validation > (Group)
8-28-2014[09:00:45 AM]: Engine: property 'INDUSTRY_TYPE:valid' value now ''
8-28-2014[09:00:45 AM]: Engine: property 'INDUSTRY_TYPE' value now 'Contractor'


The Current page is set to IndustryType which causes the groupbox to be displayed.

8-28-2014[09:00:45 AM]: Engine: property 'ISCurrentPage' value now 'IndustryType'
8-28-2014[09:00:45 AM]: UI DLL: Executing action .


I use a DLL extension to get the value of INDUSTRY_TYPE from the registry. However, the user validation resets everything again.

8-28-2014[09:00:49 AM]: Engine: property 'INDUSTRY_TYPE' value now 'Home Builder'
8-28-2014[09:00:51 AM]: UI DLL: Executing user validation > (Group)
8-28-2014[09:00:51 AM]: Engine: property 'INDUSTRY_TYPE:valid' value now ''
8-28-2014[09:00:51 AM]: Engine: property 'INDUSTRY_TYPE' value now 'Contractor'
8-28-2014[09:00:51 AM]: UI DLL: Extension Action SuiteValidateProdReg.dll::GetIndustryType returned 0x00000000.


The groupbox has the following styles set:



Each radiobutton has the following styles set:



Each radiobutton is bound to INDUSTRY_TYPE.



Any ideas what I can do to fix this in InstallShield 2013? InstallShield 2014?


Thanks,

--Kim
0 Kudos
kmoulton
Level 6

I should add that I have a Button that is placed ahead of the IndustryType radio buttons that has WS_TABSTOP set but is not visible.



Thanks,

--Kim
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

I don't think the hidden button affects things. I put together a wizard page similar to what you describe, and it works fine on my InstallShield 2014 test. For testing purposes, can you make the preceding button visible to see if it resolves the issue? If that doesn't, we may need to look more closely at the validation. but I think it's the radio button as first tab stop problem. If that is the problem, are you in a position to upgrade or do we need to investigate other options?
0 Kudos
kmoulton
Level 6

I have been unable to get this to work in InstallShield 2013.

I was able to get this to work in InstallShield 2014 by using two different properties.

I set one property in Property Manager and associated it with each of the radio buttons content property. When each radio button was clicked, I set another property that was the INDUSTRY_TYPE value associated with each button.

Property Manager: IndustryType one

RadioButton1: content\property IndustryType== one
RadioButton2: content\property IndustryType==two
RadioButton3: content\property IndustryType==three
...
Click: RadioButton1 SetProperty INDUSTRY_TYPE to Contractor
Click: RadioButton2 SetProperty INDUSTRY_TYPE:to Developer...
Click: RadioButton3 SetProperty INDUSTRY_TYPE to Electrical
...

I was able to determine the INDUSTRY_TYPE before the radio button group was displayed and use it to preset the IndustryType for the correct radio button.

Thanks,

--Kim
0 Kudos