You can override method selectControl on the required form like this:

public boolean selectControl(FormControl _control)
{
    boolean ret;

      // print current control
    if (_control)
        print _control.toString();

    ret = super(_control);

    return ret;
}


Instead of printing, you can store current control in some variable and use it later in other methods.


Best regards

Artem Tymofyeyev
Axapta Technology Domain

Microsoft Business Solutions
Navision
Frydenlunds All� 6, DK-2950 Vedbaek
http://www.microsoft.com/BusinessSolutions

-----Original Message-----
From: HEW (Mag. Helmut Wimmer) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 14:28
To: '[EMAIL PROTECTED]'
Subject: [development-axapta] How can I determine in which field of of form the cursor/user is in ?

Hi

How can I get via X++ in which field of the form the cursor currently
stands?

I am trying formrun.selectedcontrol() and
formrun.selectedcontrol().getselection() but this is *always* returning the
first control of the form (mostly the "Tab" control).

So, if the cursor is in the third field of the second tab page, the above
methods always return the control number of the TAB and not of the field
control.

Any ideas?
Thanx,
Helmut



Yahoo! Groups Links







Yahoo! Groups Links

Reply via email to