[英]in GWT, How to loop Gui Widget inside a panel?
Let say, I got a VerticalPanel that have some widgets (label, button, ...) that were added into it. 假设我有一个VerticalPanel,其中添加了一些小部件(标签,按钮等)。 How can i loop that VerticalPanel & access the widgets in it? 我该如何循环显示VerticalPanel并访问其中的小部件?
Well you can use iterator
,As i explained in the question How get all widgets of certain type? 好了,您可以使用iterator
,正如我在问题“ 如何获取特定类型的所有小部件”中所解释的那样? . 。
Iterator<Widget> widgets= vpanel.iterator();
Point to remember: 要记住的一点:
Or otherwise pick @Manolo's answer from same thread,If you are using GWT third party library GQuery. 或者,如果您使用的是GWT第三方库GQuery,请从同一线程中选择@Manolo的答案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.