窗体分隔符实现

窗体分隔符是通过组(group)容器来实现的,将它添加到窗口后,将属性HideIfEmpty和AlignChild设置为No;FrameType设置为Raise 3D;设置好其它外观样式后,重写它的鼠标事件就可以实现了。

 1 int mouseUp(int x, int y, int button, boolean ctrl, boolean shift)
 2 {
 3     int ret;
 4     ret = super(x, y, button, ctrl, shift);
 5     return _formSplitterVertical.mouseUp(x, y, button, ctrl, shift);
 6 }
 7 
 8 int mouseDown(int x, int y, int button, boolean ctrl, boolean shift)
 9 {
10     int ret;
11     ret = super(x, y, button, ctrl, shift);
12     return _formSplitterVertical.mouseDown(x, y, button, ctrl, shift);
13 }
14 
15 int mouseMove(int x, int y, int button, boolean ctrl, boolean shift)
16 {
17     int ret;
18     ret = super(x, y, button, ctrl, shift);
19     return _formSplitterVertical.mouseMove(x,y,button,ctrl,shift);  //容器的名称
20 }
posted @ 2012-08-30 15:54  Sprite.z  Views(265)  Comments(0Edit  收藏  举报