Announcement

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

    serveral checkbox in one line

    Hi, I want to ask how to put some checkbox in one line?
    e.g.
    There is a Dynamic Form with some fields, it looks like this:

    Username : [TextField]
    Birthday : [DateField]
    Favorite Cities : [checkbox]Boston [checkbox] Paris [ckeckbox] London [checkbox]Cambridge [checkbox]ShangHai [checkbox]Kyoto
    ......


    So, you can see that i want to put some checkbox in one line, how to do it?

    #2
    See the FormLayout overview from the SmartClient Reference, you need to set a high numCols value and perhaps other settings.

    You may instead want a RadioGroupItem (mutually exclusive selection), in which case just setVertical(false) works.

    Comment


      #3
      Also see my post here

      Sanjiv
      Last edited by sjivan; 12 Dec 2008, 23:57.

      Comment


        #4
        Thank your replies

        thanks, I have put them in one line now.

        I set the form 6 columns, the first column is a staticTextField, and the others are 5 checkbox each takes one column. The 5 checkbox columns is the same width.

        Now I set the first column width a fixed value. I want the first 4 columns of the 5 checkbox columns can auto width by the text of checkbox, and the last checkbox column takes the rest width. How can i do that?

        I use the following setting, but no effects.

        Code:
        form.setColWidths(120, "", "", "", "", "*");
        Thank you guys again!

        Comment


          #5
          You could do this by combining two forms into an HLayout. The second form should have the control that you intend to take all the remaining space and that form should be width:"*". The first form will have all the other controls and you can simply set a small value (eg 10) for all the checkbox columns that you intend to autosize.

          Comment


            #6
            OK,i'll try that.

            Comment

            Working...
            X