我已经创建了一个SplitLayoutPanel,当我按下一个button.how时,我需要阻止移动,可以做什么?
SplitLayoutPanel splitPanel = new SplitLayoutPanel();发布于 2013-01-09 14:24:40
您没有直接的api来处理此问题。你应该能够破解SplitLayoutPanel来做到这一点。
步骤1-将SplitLayoutPanel复制到代码库中,但确保它具有与gwt中相同的包。
步骤2-添加boolean标志和相关apis来跟踪禁用拖动。
boolean dragEnabled;
setDragEnabled(boolean dragEnabled)
{
this.dragEnabled=dragEnabled;
}步骤3- SplitLayoutPanel有一个"Splitter“内部类。在onBrowserEvent代码中,可以这样做
onBrowserEvent(){
if(dragEnabled){
Do the normal thing. Copy the existing code.
}else{
Do nothing!!!
}
}https://stackoverflow.com/questions/14214170
复制相似问题