Announcement

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

    Form Layout

    Hello there! I'm trying to create a simple form for search.

    But I can't get the formitems to be laid as I desire.

    I need a form with a textfield and a button in the same row, not underneath it.

    But I can't get this to work. Also, It would be nice if it's nested inside a group:

    Code:
    DynamicForm searchForm = new DynamicForm();
    		searchForm.setGroupTitle(title);
    		searchForm.setItemLayout(FormLayoutType.TABLE);
    		TextItem query = new TextItem();
    		query.setTitle("Query");
    		query.setWidth(400);		
    		searchForm.setIsGroup(true);
    		searchForm.setWidth100();
    		
    		ButtonItem pesquisar = new ButtonItem("queryBtn", "Search");
    		
    		
    		
    		searchForm.setFields(query,pesquisar);
    The above code lays components in a 2 row form, with the button aligned to the left.

    I could not find a way to manage the form layout.

    Is there any sample of this?

    #2
    ButtonItem by default has setStartRow(true) and setEndRow(true), you need to have startrow as false. You can also use pickerIcons, http://www.smartclient.com/smartgwt/showcase/#form_category_picker_icons

    Comment


      #3
      Thanks, the picker item not only solved, but also displayed a more elegant UI.

      Comment

      Working...
      X