Mouse group splitter in AX

Hi,
Many of us might come across a requirement where we need to provide an option to the user to move the splitter up/down which we observe in a sales order form(Between header and footer).
Take a group and place it in between the salesorder header and sales order line further add mouseDown, mouseup, mousemove methods for the newly created group as shown below.

Follow the below process.

Mouse Group Splitter:

public class FormRun extends ObjectRun
{
SysFormSplitter_Y _formSplitter;
}

public void init()
{
super();
_formSplitter = new SysFormSplitter_Y(groupSplitter,groupTop,element);

}

int mouseDown(int x, int y, int button, boolean ctrl, boolean shift)
{
int ret;

ret = super(x, y, button, ctrl, shift);

return _formSplitter.mouseDown(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 _formSplitter.mouseMove(x,y,button,ctrl,shift);
}

int mouseUp(int x, int y, int button, boolean ctrl, boolean shift)
{
int ret;

ret = super(x, y, button, ctrl, shift);

return _formSplitter.mouseUp(x, y, button, ctrl, shift);
}

Output:
mouse

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s