PDA

View Full Version : Maybe combobox bug



fornac
18 Feb 2009, 6:36 AM
In the combobox explorer demo if i reduce the window browser
only to see the three comboboxes when i click on one of the trigger the lisbox don't
appear under the input textbox but in the middle.

i wrote a post two days ago on a similar behavior with my application. the listbox don't move with the imput combobox when using the vertical browser scrolling bar.

Regards
JLF

sven
18 Feb 2009, 6:39 AM
http://extjs.com/deploy/gxtdocs/com/extjs/gxt/ui/client/widget/form/ComboBox.html#setListAlign(java.lang.String)

fornac
19 Feb 2009, 1:09 AM
the combobox woks perfectly if i don't use the vertical browser scrolbar (not the listbox scrollbar)
so i think it's not an alignment problem. i try to use setListAlign but without success.

i join two screen capture to show what happens.

Regards
JLF

fornac
21 Feb 2009, 2:52 AM
Nobody to help me ?

sven
21 Feb 2009, 4:08 AM
Which GXT version are you using? Have you tried the lastes one?

fornac
21 Feb 2009, 4:51 AM
i use GXT 1.2.3 and GWT 1.5.3 netbeans6.5 with tomcat6.
i have done a test with a simple program with the minimum code
and then problem appears. i try FF and IE with no success.


import com.extjs.gxt.ui.client.Style.Scroll;
import com.extjs.gxt.ui.client.event.ComponentEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.Viewport;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox;
import com.extjs.gxt.ui.client.widget.layout.CenterLayout;
import com.extjs.gxt.ui.client.widget.layout.FlowData;
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;


public class jlfEntryPoint implements EntryPoint {

private Viewport viewport;
private ContentPanel centerPanel = new ContentPanel();
SimpleComboBox comboservice = new SimpleComboBox();

Button bte = new Button("expand");
Button btc = new Button("collapse");

/** Creates a new instance of jlfEntryPoint */
public jlfEntryPoint() {
}


/**
* The entry point method, called automatically by loading a module
* that declares an implementing class as an entry-point
*/
public void onModuleLoad() {

viewport = new Viewport();
viewport.setLayout(new FlowLayout());

/*
{
@Override
protected void onRender(Element parent, int pos) {
super.onRender(parent, pos);
}
};
*/
comboservice.setWidth(250);
comboservice.setFieldLabel("Services");
comboservice.setEmptyText("Selectionnez un Service");
comboservice.setEditable(false);
comboservice.add("Direction");
comboservice.add("Recherche & Technologies");
comboservice.add("Communication");
comboservice.add("Center de Ressources Informatiques");
comboservice.add("Formation ");
comboservice.add("Developpement & Relation Entreprises");
comboservice.add("Services Generaux");
comboservice.add("Documentation");
comboservice.add("Finances");
comboservice.add("Logistique");
comboservice.add("Patrimoine");
comboservice.add("Recherche");
comboservice.add("Ressources Humaines");
comboservice.add("Relations Internationales");



centerPanel.add(comboservice);
centerPanel.setSize(300, 400);

//centerPanel.addButton(bte);
//centerPanel.addButton(btc);



SelectionListener listener = new SelectionListener<ComponentEvent>() {


@Override
public void componentSelected(ComponentEvent ce) {
Button b = (Button)ce.component;

if (b.equals(bte)) {

comboservice.focus();
comboservice.expand();
// Window.alert("hello");
}
if (b.equals(btc))
comboservice.focus();
comboservice.collapse();
}

};

// bte.addSelectionListener(listener);
// btc.addSelectionListener(listener);


viewport.add(centerPanel, new FlowData(200, 1, 1, 200));

viewport.setEnableScroll(true);
viewport.setScrollMode(Scroll.AUTO);
viewport.layout();

RootPanel.get().add(viewport);

}
}
if i expand the combo listbox,reduce the window browser, and use the vertical browser scrollbar, the listbox don't move with others Elements.
regards
JLF

sven
21 Feb 2009, 4:55 AM
It is not made for scrolling with the page.

fornac
22 Feb 2009, 10:56 AM
I don't understand :-?
The GWT suggesbox works fine with scrolling page.
and not GXT combobox.

Maybe in a new version of GWT ?

thanks for your help.
JLF