Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Radio Buttons

    Hi,

    I want to create a radioButton and i was wondering what is the best way to do that?
    I saw in the examples that you use an ImgButton with actionType:"radio", but the reference only refers to a formItem with type radio, isn't there a specific component for it?

    Thanks.

    SmartClient version : v8.3p_2013-01-21/PwerEdition Development Only
    Last edited by YoniMSP; 17 Feb 2013, 02:36.

    #2
    Use RadioGroupItem.

    Comment


      #3
      what is the difference between type="radioGroup" and RadioGroupItem? your examples shows the first option.

      Comment


        #4
        It's the same, just two different ways of configuring it. See also FormItem/DataSourceField.editorType.

        Comment


          #5
          OK, so i tried using a DynamicForm with RadioGroup.
          Above the DynamicForm i have a Label. and i can't get them aligned.

          All my components (Labels, Buttons and other) are aligned, except the radioGroup.

          i couldn't find a way to move the radioGroup to the left, so it will be in the same row as all other components. can you assist?

          attached is a screenshot.

          Code:
          isc.Label.create({
                  contents:Translation.SEARCH_FOR_ITEM_TYPE,
                  height:1,
                  styleName:"supplementaryInstruction"
          }) ,
          isc.DynamicForm.create({
                  width: 1,
                  cellPadding :0,
                  fields : [{
                     name: "bugStatus",
                     showTitle: false,
                     textBoxStyle : "normal",
                     editorType: "radioGroup",
                     valueMap : {
                          "new" : "New",
                          "active" : "Active",
                          "revisit" : "Revisit"
                     }
                 }]
          })
          Attached Files
          Last edited by YoniMSP; 17 Feb 2013, 13:38. Reason: still needs help

          Comment


            #6
            Presumably you're trying to have the label text align with the radio-item element (the clickable circle).
            It looks like you just need to
            - set numCols to 1 on the form
            - specify matching padding on the Label widget and on the DynamicForm [or apply a css style with matching padding]
            - ensure the cellPadding / cellSpacing are not have unintended effects on your DynamicForm layout
            - ensure the textBoxStyle for the radioGroupItem is set to something with no additional padding or margin

            Let us know if you still cant get it working with these considerations

            Thanks
            Isomorphic Software

            Comment

            Working...
            X