Re: Add Widget to the a Panel at first Position?
Hi, Oliver The FlowPanelhttp://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/FlowPanel.html allows you to do that using the method *insert http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/FlowPanel.html#insert(com.google.gwt.user.client.ui.Widget, int)*(Widgethttp://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/Widget.html w, int beforeIndex). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Add Widget to the a Panel at first Position?
If you want to add a Widget to a lets say FlowPanel you have to do the following: @UiFieldFlowPanel panel; Widget widget; // some widget panel.add(widget) This appends the widget to the panel, which means it comes a last position of the panel's child Widgets. I.e.: div div class=w1 / div class=w2 / div class=w3 / div class=widget //div *Is there any way to get a newly inserted widget a the first position, i.e., make a prepend, without removing all the other widgets first?* *Is there any way to get a newly inserted widget a a certain index within the parent?* -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Add Widget to the a Panel at first Position?
There should be something like panel.insertBefore(...) which could satisfy both your requests. On Dec 7, 2013 4:10 PM, confile michael.gorsk...@googlemail.com wrote: If you want to add a Widget to a lets say FlowPanel you have to do the following: @UiFieldFlowPanel panel; Widget widget; // some widget panel.add(widget) This appends the widget to the panel, which means it comes a last position of the panel's child Widgets. I.e.: div div class=w1 / div class=w2 / div class=w3 / div class=widget //div *Is there any way to get a newly inserted widget a the first position, i.e., make a prepend, without removing all the other widgets first?* *Is there any way to get a newly inserted widget a a certain index within the parent?* -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.