dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Curious

  1. #1
    john Guest

    Curious


    On a form if a user presses the tab key I want the focus to be set at
    a particular box. I use keypress event to determine the key punched. If I
    use any other key then tab to setfocus it does fine. I assume tab is reserved
    for the tab order, but is there anyway around this?

  2. #2
    Craig Berntson Guest

    Re: Curious

    Tab is reserved by Windows to move focus to the next control on the form.

    --
    Craig Berntson
    MCSD, Visual FoxPro MVP
    www.craigberntson.com
    Salt Lake City Fox User Group
    www.slcfox.org
    Visit FoxCentral www.foxcentral.net
    ---


    "john" <john4344@yahoo.com> wrote in message
    news:3c21f986$1@147.208.176.211...
    >
    > On a form if a user presses the tab key I want the focus to be set at
    > a particular box. I use keypress event to determine the key punched. If I
    > use any other key then tab to setfocus it does fine. I assume tab is

    reserved
    > for the tab order, but is there anyway around this?




  3. #3
    Tamar E. Granor Guest

    Re: Curious

    On 20 Dec 2001 14:45:26 GMT, "john" <john4344@yahoo.com> wrote:

    >
    > On a form if a user presses the tab key I want the focus to be set at
    >a particular box. I use keypress event to determine the key punched. If I
    >use any other key then tab to setfocus it does fine. I assume tab is reserved
    >for the tab order, but is there anyway around this?


    Then why not set the tab order to put those controls one after the
    other?

    Or do you mean that no matter where the user is, you want tab to move
    to a particular control? If that's it, it's probably not a good idea.
    Most users know that tab moves them through the sequence of controls
    and are likely to be annoyed if it doesn't work that way.

    What's your goal here?

    Tamar

  4. #4
    Vlad Grynchyshyn Guest

    Re: Curious

    Hi!

    In the KeyPress event you have to use NODEFAULT command to suppress the
    default behaviour of the key. With that command any key will have no effect
    on the focused control. Note also that certain keys are catched by FoxPro
    before they reach the KeyPress event.

    --
    WBR,
    Vlad Grynchyshyn, Developer, MVP, MCP.


    "john" <john4344@yahoo.com> wrote in message
    news:3c21f986$1@147.208.176.211...
    >
    > On a form if a user presses the tab key I want the focus to be set at
    > a particular box. I use keypress event to determine the key punched. If I
    > use any other key then tab to setfocus it does fine. I assume tab is

    reserved
    > for the tab order, but is there anyway around this?




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center