1

I am working on a piece of code in which I have a panel and say 5 radio buttons listed vertically. Next I change this number to 15 but my panel size is say 100*100 in which last few radio buttons will not get displayed. So now I want my panel to resize automatically depending upon the inner panel size. How could I achieve this?

Thanks in advance!

4

2 回答 2

1
  1. 要使您的应用程序能够调整浏览器的大小,您应该首先开始使用LayoutPanels

  2. 然后记住您必须以百分比设置面板、小部件width和属性height

  3. 确保整个层次结构仅包含LayoutPanel

  4. 在调整应用程序大小时永远不要使用绝对面板

如果您像我一样在使用LayoutPanels时遇到麻烦,以下链接将为您提供帮助

GWT Re-sizing components on browser window resize

于 2013-03-06T11:55:57.473 回答
0

这在很大程度上取决于您在屏幕设计和布局方面的经验。您可以搜索响应式和自适应布局概念并使用 GWT 进行尝试。

首先 - 您应该参考 GWT 尝试使用LayoutPanel调整大小的屏幕

您也可以尝试在您的情况下使用滚动面板(如果出现 50 个按钮,那么场景是什么?)

于 2013-03-06T09:21:15.830 回答