[英]GWT textbox add a button
I have a text box where i am trying to get a button in the textbox. 我有一个文本框,试图在文本框中获得一个按钮。 I know this is a little tricky with GWT.
我知道GWT有点棘手。
I have a HorizontalPanel where i am adding the textbox. 我在其中添加文本框的HorizontalPanel中。
HorizontalPanel bar = new HorizontalPanel();
bar.addStyleName("indexBar");
bar.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
bar.add(new Label("Select Accounts"));
bar.add(accounts);
Label fname = new Label("Search First Name");
fname.setStyleName("firstNameLabel");
firstNameSearch = new TextBox();
bar.add(fname);
bar.add(firstNameSearch);
I have seen this can be done using html/css, i am just unable to figure it out with GWT. 我已经看到可以使用html / css完成此操作,但我无法通过GWT来解决。
thanks 谢谢
this can be done by wrapping - try using the static wrap method with TextBox - 这可以通过包装来完成-尝试对TextBox使用静态包装方法-
//method - static
TextBox.wrap(Element element)
// "Creates a TextBox widget that wraps an existing <input type='text'> element."
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.