PDA

View Full Version : SplitButtons arrow is not shown



dato.java
8 Dec 2010, 3:01 AM
Hello ,

I am developing little Ext GWT (2.2.1) application and use SplitButton :


final SplitButton splitButton = new SplitButton("Simple Split Button");

splitButton.setWidth("140px");
splitButton.setHeight("100px");
splitButton.setArrowAlign(ButtonArrowAlign.RIGHT);

Menu m=new Menu();
MenuItem m1=new MenuItem("Item One");
MenuItem m2=new MenuItem("Item Second");
m.add(m1);
m.add(m2);
splitButton.setContextMenu(m);


But when i run my application only button is shown without arrow, in my Application.html i have the following in html head element:


<script type="text/javascript" src="resources/flash/swfobject.js"></script>
<link href="resources/css/gxt-all.css" type="text/css" rel="stylesheet"/>

so this resources i have downloaded when i used 2.2.0 version, so what may be problem?

sven
8 Dec 2010, 3:50 AM
Its
splitButton.setMenu(m); and not
splitButton.setContextMenu(m);


so this resources i have downloaded when i used 2.2.0 version, so what may be problem?
Everytime you update the gxt.jar you also need to update the resources.

dato.java
8 Dec 2010, 5:24 AM
Thank you very much ,it works now