Announcement

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

    DynamicForm and search button

    hi everyone
    i'm new of this forum and im new to use smartgwt

    i have a problem

    i try to create a search bar with button
    i use a DynamicForm

    my problem is the search button not appear at right of search bar but appear down on it

    anyone can help me?

    i put a code


    DynamicForm NameForm = new DynamicForm();
    NameForm.setIsGroup(true);
    NameForm.setGroupTitle("Name Search");


    TextItem NameField = new TextItem("Value");
    NameField.setTooltip("Insert Object Name");
    ButtonItem ButtonParameter3 = new ButtonItem();
    ButtonParameter3.setAutoFit(true);

    ButtonParameter3.setTitle("Search");
    ButtonParameter3.addClickHandler(new ClickHandler() {

    public void onClick(ClickEvent event) {
    // grid.fetchData(form.getValuesAsCriteria());
    }
    });

    NameForm.setFields(NameField,ButtonParameter3);
    thx for help
    Last edited by jbrown; 6 Jul 2010, 23:53.

    #2
    Hi,

    your can try this one on the Button:

    Code:
    ButtonParameter3.setStartRow(false);
    PS: name of variables shouldn't start with a uppercase letter by Java Convention

    greetz

    Comment


      #3
      Not run

      i put a image of result

      i desire put the search button on right of value's bar not down
      Attached Files
      Last edited by jbrown; 7 Jul 2010, 10:07.

      Comment


        #4
        By default ButtonItem will setStartRow(true) and setEndRow(true), you need to setStartRow(false) to get the button on the same line as the text box AND you need to have enough columns set in your form to handle it, namely at least 3.

        Comment

        Working...
        X