Write these at ClassDeclaration:
SysFormSplitter_X _VerticalSplitter;
SysFormSplitter_Y _HorizontalSplitter;
SysFormSplitter_Y _HorizontalSplitter;
First was for vertical splitter, second was horizontal. Put this code part to forms init method:
_VerticalSplitter = new SysFormSplitter_X(VerticalSplitter,groupLeft,element);
_HorizontalSplitter = new SysFormSplitter_Y(HorizontalSplitter,groupTop,element);
Arrangements for vertical splitter:
VerticalSplitter at up is group control for use vertical splitter control. It parameters are:
AlignChild = No
AlignControl = Yes
AutoDeclaration = Yes
BackgroundColor = Window background
FrameType = Raised 3D
HideifEmpty = No
Height = Column height
Width = 5
We put two group controls of vertical splitter one is left and one is right and it's parents column value should 3. This is important for a correct screening.Make Autodeclaration = Yes for left group. (It's name is groupLeft at upper). It's Height value must be Column Height, Width may be like 100-200, width value will be change and save after we move the splitter. Right groups height value should be column height and width value should be column width.
Vertical splitters methods are should be like:
int mouseUp(int x, int y, int button, boolean ctrl, boolean shift)
{
int ret;
ret = super(x, y, button, ctrl, shift);
Return _VerticalSplitter.mouseUp(x, y, button, ctrl, shift);
}
{
int ret;
ret = super(x, y, button, ctrl, shift);
Return _VerticalSplitter.mouseUp(x, y, button, ctrl, shift);
}
int mouseMove(int x, int y, int button, boolean ctrl, boolean shift)
{
int ret;
ret = super(x, y, button, ctrl, shift);
Return _VerticalSplitter.mouseMove(x,y,button,ctrl,shift);
}
{
int ret;
ret = super(x, y, button, ctrl, shift);
Return _VerticalSplitter.mouseMove(x,y,button,ctrl,shift);
}
{
int ret;
ret = super(x, y, button, ctrl, shift);
Return _VerticalSplitter.mouseDown(x, y, button, ctrl, shift);
}
Arrangements for horizontal splitter:
I'll just tell differences with vertical.Different parameters:
Columns = 1 for splitters parent control.
Height = 5
Width =Column Width
Upper groups name is groupTOP for our sample. Height value may be like 100-200 and Width value is Column width. Methods names different; instead of _VerticalSplitter, _HorizontalSplitter. Lower groups Width value is Column Width and Height value is Column Height.
Hiç yorum yok:
Yorum Gönder