Mouse click not working (ComboBox, ListGrid etc..)

61 views
Skip to first unread message

smdvq

unread,
Oct 20, 2011, 3:09:50 PM10/20/11
to Google Web Toolkit
Hello,

I have a strange problem and i am sure it is just simple mistake of
some kind but i cant really find it and i dont really know what to
search.

I create a new window with VerticalPanel in it. Inside this Vertical
Panel i put TabSet with SelectItem component. The problem is that
clicking on drop down is not working. Same situation is when i put
ListGrid inside, RecordClickHandler and RecordDoubleClickHandler are
not working at all (but RowContextClickHandler works).

When i remove VerticalPanel and add these components directly -
problem is gone. I just want to know why Here is code that produces 2
windows: one with VerticalPanel and one without (one is working, the
second is not) :

public class Test implements EntryPoint {

public void onModuleLoad() {

//Without verticalPanel - works !
SelectItem s1 = new SelectItem();
s1.setTitle("Test List");
s1.setMultiple(true);
s1.setMultipleAppearance(MultipleAppearance.PICKLIST);
s1.setValueMap("a", "b", "c");

DynamicForm c1 = new DynamicForm();
c1.setItems(s1);

TabSet topTabSet = new TabSet();
topTabSet.setTabBarPosition(Side.TOP);
topTabSet.setWidth(800);
topTabSet.setHeight(150);
Tab t1 = new Tab("Tab1");
Tab t2 = new Tab("Tab2");
t2.setPane(c1);
topTabSet.addTab(t1);
topTabSet.addTab(t2);

Window window2 = new Window();
window2.setAutoSize(true);
window2.setTitle("Without VerticalPanel");
window2.setWidth(640);
window2.setHeight(480);
window2.setCanDragReposition(true);
window2.setCanDragResize(true);
window2.addItem(topTabSet);
window2.show();

//With verticalPanel - not working !
SelectItem s2 = new SelectItem();
s2.setTitle("XXX");
s2.setMultiple(true);
s2.setMultipleAppearance(MultipleAppearance.PICKLIST);
s2.setValueMap("d", "e", "f");

DynamicForm c2 = new DynamicForm();
c2.setItems(s2);

TabSet topTabSet2 = new TabSet();
topTabSet2.setTabBarPosition(Side.TOP);
topTabSet2.setWidth(800);
topTabSet2.setHeight(150);
Tab t11 = new Tab("Tab1");
Tab t22 = new Tab("Tab2");
t22.setPane(c2);
topTabSet2.addTab(t11);
topTabSet2.addTab(t22);

VerticalPanel vp = new VerticalPanel();
vp.add(topTabSet2);

Window window = new Window();
window.setAutoSize(true);
window.setTitle("With VerticalPanel");
window.setWidth(640);
window.setHeight(480);
window.centerInPage();
window.setCanDragReposition(true);
window.setCanDragResize(true);
window.addItem(vp);
window.show();

}
}

Jeff Larsen

unread,
Oct 20, 2011, 3:17:57 PM10/20/11
to google-we...@googlegroups.com
This has the look of smartgwt. It is generally a bad idea to mix gwt widgets with smartgwt widgets. 

Patryk Sosinski

unread,
Oct 20, 2011, 3:39:08 PM10/20/11
to google-we...@googlegroups.com

You’re right! After switching from VerticalPanel to VLayout everything works.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/GsZXX--la0kJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Nie znaleziono wirusa w tej wiadomosci przychodzacej.
Sprawdzone przez AVG - www.avg.com
Wersja: 9.0.917 / Baza danych wirusów: 271.1.1/3963 - Data wydania: 10/20/11 08:34:00

Reply all
Reply to author
Forward
0 new messages