in

Dynamics User Group

Since 1995 - The Microsoft Dynamics Online User Community

Field Focus

Last post 08-26-2008 22:57 by Savatage. 4 replies.
Page 1 of 1 (5 items)
Write a New Post Sort Posts: Previous Next
  • 08-26-2008 11:59

    • hb3477
    • Not Ranked
    • Joined on 08-26-2008
    • Posts 2
    • Points 55

    Field Focus

    Hi all,

    Anyone who could give a tip or idea on how I in a codeunit determine which field in a form that has focus, i.e. where the cursor is. I have looked for a function GetFocus (or maybe a method myForm.GetFocus) etc but no cigarr. For reasons I do not want to use the trigger OnActivate. 

     /Hans

    Filed under:
    • Post Points: 20
  • 08-26-2008 15:13 In reply to

    Re: Field Focus

    Why not just explain what it is you are trying to achieve. 

    David Singleton - MVP Dynamics NAV
    Dynamics NAV Consultant since 1991
    Available for Navision Go-Live assistance
    Dynamics Book
    • Post Points: 20
  • 08-26-2008 16:00 In reply to

    • hb3477
    • Not Ranked
    • Joined on 08-26-2008
    • Posts 2
    • Points 55

    Re: Field Focus

    It's quite simple. I have a button named "Check...." in a form with several fields. When pressing this button the check will be different depending on which field has focus.

    /Hans

    • Post Points: 35
  • 08-26-2008 16:45 In reply to

    Re: Field Focus

    Well when you click the button the CHECK button will have focus, not the previous control.

     

    I think that what ever it is you are doing you are doing the wrong way. Why do you want to use the cursor position for this? What if the user does not use the mouse.

    David Singleton - MVP Dynamics NAV
    Dynamics NAV Consultant since 1991
    Available for Navision Go-Live assistance
    Dynamics Book
    • Post Points: 5
  • 08-26-2008 22:57 In reply to

    • Savatage
    • Top 75 Contributor
      Male
    • Joined on 03-16-2003
    • New York
    • Posts 234
    • Points 7,255
    • DynamicsNAVMVP

    Re: Field Focus

    hb3477:

    It's quite simple. I have a button named "Check...." in a form with several fields. When pressing this button the check will be different depending on which field has focus.

    /Hans

    I guess it's not so simple, perhaps the theory of what you want to do is simple.  Perhaps you can explain the "checks".

    Example/if field 1 is blank then do something to field 2 & 3 if field 2 is blanks then do something to 4 & 5....etc etc?????
    It's funny sometimes & I read posts and try so hard to understand what they really want that I miss the obvious on occasion.
    Big SmileWhen you click your button - you've lost your focus - nice catch

    Harry Ruiz  - Dynamics NAV MVP
    www.CosmeticSolutions.biz
    www.DreamTheater.net

    • Post Points: 5
Page 1 of 1 (5 items)


Copyright Dynamics User Group, 1995-2008, all rights reserved. This website and user group are independent and not affiliated with the Microsoft Corporation.