It's more easy to add splitter control to AX 2012 than 2009. I'll tell horizontal splitter:
Add a group for top part of form. I named it as Hsplitter. Set AutoDeclaration = Yes and Style = SplitterHorizontalContainer. Add another group for down part of form. Give a name to top group. I named it as TopGroup, also set AutoDeclaration = Yes for this group too. Make bottom groups Height as Column Height. Splitter group should be betwen of other two.
Add this line to form's classDeclaration:
SysFormSplitter_Y HorizontalSplitter;
If splitter will be vertical should be SysFormSplitter_X.
Add this line to form's init method:
HorizontalSplitter = new SysFormSplitter_Y(HSplitter,TopGroup, element);
If vertical, should be new SysFormSplitter_X ...
That's all...
splitter etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
splitter etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
2 Eylül 2014 Salı
2 Aralık 2011 Cuma
AXAPTA splitter control
There isn't a true splitter control in Axapta. There is a class made by group panels. There are a lot of forms use this control.
Write these at ClassDeclaration:
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 mouseDown(int x, int y, int button, boolean ctrl, boolean 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.
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.
Kaydol:
Kayıtlar (Atom)