Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Questions on TextBox control

Questions on TextBox control

Scheduled Pinned Locked Moved C#
helptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bouli
    wrote on last edited by
    #1

    Hi gurus, I'd like to know how to do the two following operations on TextBox controls: - Moving the cursor to the end of the text, so the new added lines are always visible without moving the scroll bar. - Setting the focus on a TextBox. the Focus() method does not work :( Thanks for the help. fred. There is no spoon.

    S 1 Reply Last reply
    0
    • B bouli

      Hi gurus, I'd like to know how to do the two following operations on TextBox controls: - Moving the cursor to the end of the text, so the new added lines are always visible without moving the scroll bar. - Setting the focus on a TextBox. the Focus() method does not work :( Thanks for the help. fred. There is no spoon.

      S Offline
      S Offline
      Sheel Gohe
      wrote on last edited by
      #2

      answers: 1. .Select(); SendKeys.Send("{END}"); 2. .Select(); Sheel Gohe

      B 1 Reply Last reply
      0
      • S Sheel Gohe

        answers: 1. .Select(); SendKeys.Send("{END}"); 2. .Select(); Sheel Gohe

        B Offline
        B Offline
        bouli
        wrote on last edited by
        #3
        1. I have found another alternative by using the SelectionStart set to Text.Length and ScrollToCaret method. 2) The Select() method does not set the caret to the wanted control. Actually the Focus() method was right, the wrong thing was that I was modifying the interface through a secondary thread. Thanks for the help. There is no spoon. -- modified at 11:05 Wednesday 18th January, 2006
        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups