No announcement yet.

Need some help with radio buttons..

  • Filter
  • Time
  • Show
Clear All
new posts

  • Need some help with radio buttons..

    Hi y'all,

    I need some help with my radio buttons on a Custom Page.

    I found a thread here, concerning radio buttons and packages. Everythings works like a charm, BUT no radio button ist checked by default.

    Okay, right, I could just do it with the default Radio buttons Page, but I really don't like the look, so I decided to add a Custom Page and design it by my own.

    I just copied the code from the example and added it to my new Custom Page On Next actions.

    Here's the code:

    SetupData.SetPackageProperties("complete", 	{Install = DlgRadioButton.GetProperties(CTRL_RADIO_BUTTON_01).Checked});
    SetupData.SetPackageProperties("iDesktop", 	{Install = DlgRadioButton.GetProperties(CTRL_RADIO_BUTTON_02).Checked});
    SetupData.SetPackageProperties("jScripts", 	{Install = DlgRadioButton.GetProperties(CTRL_RADIO_BUTTON_03).Checked});
    What could I do, to have a radio button checked by default, when the screen appears? All of them are unchecked and I don't find any option, where I could change it.

    So, as you can see, I really need your help

    Helping answers are very much appreciated!

    Last edited by RUU7; 12-29-2009, 07:57 AM. Reason: typo

  • #2
    In the radio button screen, select the "attributes" tab.
    on the right side, there is a drop down box labeled "Default selection"


    • #3
      Thank you for your reply!

      Unfortunately, I do not have a radio button screen, because i added a custom screen and 3 radio buttons instead and there is no selection at all.

      There is no way to do that, isn't it?


      • #4
        My Sincerest apologies! I missed the key phrase that indicated you had a custom screen...

        The way to handle that is in on preload just scan to see if one is set; if not; set the default...

        Remember to store the selection of that in "on Next" and "on back" so that "on preload" can reselect the users selection....


        • #5
          Ah, okay. No problem at all. Will try that. Thanks!


          • #6
            Hi jassing,

            I literally not a coder person but I tried and I obviously failed. :/

            That's my code:

            On Preload:
            result_complete = DlgRadioButton.GetProperties(CTRL_RADIO_BUTTON_01);
            result_iDesktop = DlgRadioButton.GetProperties(CTRL_RADIO_BUTTON_02);
            result_jScripts = DlgRadioButton.GetProperties(CTRL_RADIO_BUTTON_03);
            if (result_complete) then
             DlgRadioButton.SetProperties(CTRL_RADIO_BUTTON_01, {Checked})
            if (result_iDesktop) then
             DlgRadioButton.SetProperties(CTRL_RADIO_BUTTON_01, {Checked})
            if (result_jScripts) then
             DlgRadioButton.SetProperties(CTRL_RADIO_BUTTON_01, {Checked})
            3 Radio buttons on a Custom screen:

            - CTRL_RADIO_BUTTON_01
            - CTRL_RADIO_BUTTON_02
            - CTRL_RADIO_BUTTON_03

            I added 3 packages to my installer:

            - complete
            - iDesktop
            - jScripts

            I need to have the first radio button (CTRL_RADIO_BUTTON_01) checked when the screen appears.

            It does not work and I don't get it at all. Could you please help me again?

            Would be very much appreciated!

            Last edited by RUU7; 12-31-2009, 12:52 AM.


            • #7
              Your preload will have something like this:

              if (result_complete) then
               DlgRadioButton.SetProperties(CTRL_RADIO_BUTTON_01, {Checked=true})
              You're "on next" or "on back" will have

              result_complete = DlgRadioButton.GetProperties(CTRL_RADIO_BUTTON_01).Checked


              • #8
                To report back:

                thank you very much, jassing, but I'm really not a coder and I just gave up at this and went back to the radio buttons page, which is working great now.

                Thank you very much for your efforts!