Announcement

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

    Is it possible to put all form items in a line?

    Hi, is it possible to put all form items in a line?

    I have my dynamic form set like this:
    Code:
    		loginForm = new DynamicForm();
    		TextItem usernameItem = new TextItem();
    		usernameItem.setTitle("User");
    		PasswordItem passwordItem = new PasswordItem();
    		passwordItem.setTitle("Password");
    		ButtonItem loginBtn = new ButtonItem();
    		loginBtn.setTitle("Login");
    		
    		loginForm.setFields(new FormItem[]{usernameItem, passwordItem, loginBtn});
    		loginForm.setNumCols(6);
    But it shows the form like the attached image. How can I set the form to display all items in one line?

    Thanks!
    Attached Files

    #2
    http://www.smartclient.com/smartgwt/...ut_form_titles


    and loginForm.setNumCols(2);

    Comment


      #3
      Originally posted by wolf View Post
      I am sorry about the confusion. I am trying to make it in a row.

      Comment


        #4
        setNumCols(4) should do what you want.
        The title and the item need one column each when they are presented next to each other.

        Have a look at the API, it is explained quite well there...

        Comment


          #5
          loginBtn.setStartRow(false);

          should work.

          Comment


            #6
            Originally posted by mouli View Post
            loginBtn.setStartRow(false);

            should work.
            This is the perfect solution!

            Thanks!

            Comment

            Working...
            X