我尝试在GXT 3中制作可重复使用的水平可拆分面板。
我找到了this post。我适应了sencha.gxt进口,我提出了这个解决方案:
public class WestCenter extends BorderLayoutContainer {
private ContentPanel westPanel;
private ContentPanel centerPanel;
public WestCenter(){
westPanel = new ContentPanel();
centerPanel = new ContentPanel();
BorderLayoutData westData=new BorderLayoutData(800);
westData.setSplit(true);
westData.setCollapsible(true);
westData.setMargins(new Margins(0,5,0,0));
BorderLayoutData centerData=new BorderLayoutData();
setWestWidget(westPanel, westData);
setCenterWidget(centerPanel,centerData);
}
public void setWestHeadingText(String text){
this.westPanel.setHeadingText(text);
}
public void setCenterHeadingText(String text){
this.centerPanel.setHeadingText(text);
}
@UiChild(tagname = "westContent")
public void setWestContent(Widget widget){
this.westPanel.setWidget(widget);
}
@UiChild(tagname = "centerContent")
public void setCenterContent(Widget widget){
this.centerPanel.setWidget(widget);
}
问题
我有一种非常奇怪的行为:我可以从左到右拖动分割栏,但不能从左到右拖动。因此,从右到左的拖动无法撤消!
有什么想法吗?
我试过了:
......没有成功。
答案 0 :(得分:0)
答案在javadoc中:
When split = true, it is common to specify a minSize and maxSize for the region.
minSize
和maxSize
的默认值实际上太小了。