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

Setting RadioButton Default Problem


4 replies to this topic

Dave I

Dave I
  • Members
  • 195 posts

Posted 22 February 2001 - 13:02

I have a problem eg.

I have a RadioButton group "NUMBER" with 2 buttons:
                           One       =     Value  - ONE
                           Two       =     Value  - TWO

Now in order to make One to be the default radio button, in the Property Manager I set NUMBER=ONE  (As it says in the help.)

No problems so far.  The problem occurs is that if this dialog is skipped in the sequence then all the  components in my install with the condition NUMBER="ONE" get installed.

Now how can I set the default without setting the Property to a value.  Or alternatively how can I recalculate the conditions at the end of the UI sequence.
         
I could just not set a default but it looks stupid, or am being stupid and missing something trivial?


SteveP

SteveP
  • Members
  • 126 posts

Posted 22 February 2001 - 18:04

It sounds as though you may need three buttons in your group if you don't want One or Two to be your default.  The problem is that you can't associate a NULL value with a Property ... it is not allowed by the Table.  Perhaps it would be appropriate to add a 'Default' button and assign it a value that your conditions will use to set your options correctly.

Dave I

Dave I
  • Members
  • 195 posts

Posted 22 February 2001 - 18:50

Thanks for replying.

I afraid that a 3rd "None of them" button isnt feasible.  

The question I am asking is which product they want has only 3 possible answers, an answer of None would mean, well there is nothing else to install so why are you here?!?!

As messy as it sounds I might have to employ and set a 2nd property based on the Radio Group PROPERTY and use this as the condition on the components.

I cannot understand why PROPERTIES are enforced on Radiobuttons and then they have to be given a value that is used elsewhere.  Why isnt a "Default RadioButton" attribute available on the Group options?

Arrgggghh! I spend 1/2 my time in ISWI finding workarounds.
 


SteveP

SteveP
  • Members
  • 126 posts

Posted 22 February 2001 - 19:33

I think I see your quandry ... but I wonder if the third choice could be "Both" rather than "Neither", unless the installs are mutually exclusive.

A possible alternative is to substitute two pushbuttons, one for each install option.  Then you can set the conditional property to something that will not define either choice and execute the SetProperty action when the button is pushed.

Also, I have not *tried* it yet, but I wonder if you can get away with making the default property setting something that will not select either of the radio buttons.  I don't see anything in the documentation that forces you to define every value of the property as something that can be displayed by the buttons.

If I remember correctly, you can't define a property by a property ... at least not directly.  I suspect the simplest option would be the 'two pushbutton' route.  To ensure that only one is selected, you could start with both enabled and fire a control event to disable the other one, no matter which is selected.  Or, if you can afford to leave the dialog as soon as a selection is made, you could spawn the next dialog directly from the control events for the buttons.

Hope the suggestions are useful.