界面伸缩功能
在一个界面下,放置多个Grid之后,数据太多,要有个能推拉伸缩的功能,如下图:
中间横条可以上下拉动,折叠处可以关闭显示整个Grid
横条要代码实现,折叠只要设置一下Group就行。
纵向空的Group,来实现上下拉动。
public class FormRun extends ObjectRun
{
SysFormSplitter_Y _formSplitterVertical;
public void init()
{
;
super();
_formSplitterVertical = new SysFormSplitter_Y(ctrlSplitVertical, header, this);
}
//CtrlSplitVertical控件的重载方法
CtrlSplitVertical:int mouseDown(int x, int y, int button, boolean ctrl, boolean shift)
{
int ret;
ret = super(x, y, button, ctrl, shift);
return _formSplitterVertical.mouseDown(x, y, button, ctrl, shift);
}
CtrlSplitVertical:int mouseMove(int x, int y, int button, boolean ctrl, boolean shift)
{
int ret;
ret = super(x, y, button, ctrl, shift);
return _formSplitterVertical.mouseMove(x,y,button,ctrl,shift);
}
CtrlSplitVertical:int mouseUp(int x, int y, int button, boolean ctrl, boolean shift)
{
int ret;
ret = super(x, y, button, ctrl, shift);
return _formSplitterVertical.mouseUp(x, y, button, ctrl, shift);
}
}
{
SysFormSplitter_Y _formSplitterVertical;
public void init()
{
;
super();
_formSplitterVertical = new SysFormSplitter_Y(ctrlSplitVertical, header, this);
}
//CtrlSplitVertical控件的重载方法
CtrlSplitVertical:int mouseDown(int x, int y, int button, boolean ctrl, boolean shift)
{
int ret;
ret = super(x, y, button, ctrl, shift);
return _formSplitterVertical.mouseDown(x, y, button, ctrl, shift);
}
CtrlSplitVertical:int mouseMove(int x, int y, int button, boolean ctrl, boolean shift)
{
int ret;
ret = super(x, y, button, ctrl, shift);
return _formSplitterVertical.mouseMove(x,y,button,ctrl,shift);
}
CtrlSplitVertical:int mouseUp(int x, int y, int button, boolean ctrl, boolean shift)
{
int ret;
ret = super(x, y, button, ctrl, shift);
return _formSplitterVertical.mouseUp(x, y, button, ctrl, shift);
}
}
折叠的Group设置如图