CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: set focus

  1. #1
    Join Date
    Jul 2004
    Posts
    19

    Talking set focus

    Hi,
    i am writing some code to format the contents of the textbox on textchange event when i am pressing tab it is formatting the text but the cursor is going back to the same textbox again i want the cursor to set focus on next textbox when i press tab how can this be achieved
    jabbar

  2. #2
    Join Date
    Jul 2003
    Location
    Singapore
    Posts
    1,822
    Quote Originally Posted by jabbarsb
    Hi,
    when i am pressing tab it is formatting the text but the cursor is going back to the same textbox again
    you mean, a postback takes place? i.e the page is refreshed?
    R. Thomas
    "Be anxious for nothing, but in everything by prayer and supplication, with thanksgiving, let your requests be made know to God; and the peace of God, which surpasses all understanding, will guard your hearts and minds through Christ Jesus."Philippians 4:6-7
    "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18

  3. #3
    Join Date
    Jul 2004
    Posts
    19

    Talking setfocus

    yes the postback event takes place the code is as follows in asp.net

    privates sub text1_onchange() handles text1.change
    text1.text=text1.text.chars(0)+" "+text1.text.chars(1)+" "+text1.text.chars(2)
    end sub

    the problem is that the cursor is coming back to text1 after formatting again it should go to
    text2 when i press tab

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured