Mouse handover on Text controls in Dynamics AX using X++

Friends,

This post will help you to create Mouse handover when you hover over text control on the forms.
Please follow the steps to achieve this mouse handover.

Create a new form as shown below. Add a new Static control and Set the following properties
Text – click me
UnderLine – Yes
Bold – semibold

Override the text control mouseEnter() and mouseUp() methods and add the below code

_________________________________________________
public void mouseEnter(int _x, int _y, int _button, boolean _ctrl, boolean _shift)
{
#winapi
int hCursor;
;

hCursor = WinAPI::loadStdCursor(#IDC_HAND);

WinAPI::setCursor(hCursor);
}

_________________________________________________

public int mouseUp(int _x, int _y, int _button, boolean _ctrl, boolean _shift)
{
int ret;
;

info (“:).. Thank you for chosing me”); // You can write your business logic here

ret = super(_x, _y, _button, _ctrl, _shift);

return ret;
}
____________________________________________________

Good day!!

Advertisements

One Response to “Mouse handover on Text controls in Dynamics AX using X++”

  1. isabella Says:

    Tnx !, very usefull


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

%d bloggers like this: