使用SmartGWT的addMembers
方法与setMembers
方法向表单布局添加组件之间有什么区别?
mainLayout.addMember(northLayout);
mainLayout.addMember(southLayout);
要么
mainLayout.addMembers(northLayout, southLayout);
与
mainLayout.setMembers(northLayout,southLayout);
谢谢!!
最佳答案
看一下源代码:最后,http://www.google.com/codesearch/p?hl=en#IbhKj4VngGk/trunk/main/src/com/smartgwt/client/widgets/layout/Layout.java&q=setmembers%20package:http://smartgwt%5C.googlecode%5C.com&l=1039,每个setMembers
都调用addMember
,并删除现有的