GWT Suggestbox与Smartgwt [英] GWT Suggestbox with Smartgwt

查看:85
本文介绍了GWT Suggestbox与Smartgwt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个问题,我看不到GWT Suggestbox的下拉列表。
我将一个GWT Suggestbox添加到SmartGWT的VLayout中。然后我可以看到Suggestbox的文本框。但是当我输入一些数据时,我看不到提供的建议。
这是因为我使用SmartGWT VLayout吗?谁能告诉我如何解决它?谢谢。

I am facing a problem that I can't see the drop down list of the GWT Suggestbox. I am adding a GWT Suggestbox into SmartGWT's VLayout. Then I can see the textbox of the Suggestbox. But when I input some data, I can't see the suggestions provided. Is this because I am using the SmartGWT VLayout? Could anyone tell me how to solve it? Thanks.

对不起,上面的问题还不够清楚。我的意思是我把一个SuggestBox添加到一个高度很小的布局中。然后我可以看到SuggestBox的TextBox部分和建议的一部分,其余的建议似乎隐藏在其他布局下。以下是我的代码:

Sorry, the above question is not clear enough. What I mean is I add a SuggestBox into a layout with small height. Then I can see the the SuggestBox's TextBox part and part of the suggestion and the rest of the suggestion seems hide under other layout. Below is my code:

VLayout mainLayout = new VLayout();
mainLayout.setHeight100();
mainLayout.setWidth100();

MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
oracle.add("a");
oracle.add("aa");
oracle.add("aaa");
oracle.add("aaaa");
oracle.add("aaaaa");
oracle.add("aaaaaa");
oracle.add("aaaaaaa");
SuggestBox box = new SuggestBox(oracle, new TextBox());
VLayout suggestBoxLayout = new VLayout(); 
suggestBoxLayout.setHeight("10%");
suggestBoxLayout.addMember(box);


VLayout body = new VLayout();
body.setBackgroundColor("#3B5998");
body.setHeight("90%");

mainLayout.addMember(body);
mainLayout.addMember(suggestBoxLayout);        

所以当我在SuggestBox中输入 a ,我只能看到 a,aa,aaa ,其余的建议被 body 隐藏。

So when I enter a into the SuggestBox, I can only see a, aa, aaa and the rest suggestions are hide by the body.

推荐答案

在Alain的帮助下,我添加了 .gwt-SuggestBoxPopup {z-index:1000000;} 放入我的CSS中。然后我解决了这个问题。

With the help from Alain, I add .gwt-SuggestBoxPopup {z-index: 1000000;} into my CSS. Then I solve the problem.

这篇关于GWT Suggestbox与Smartgwt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆