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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. TextBox

TextBox

Scheduled Pinned Locked Moved C#
tutorialquestion
3 Posts 3 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.
  • J Offline
    J Offline
    Jose Vicente
    wrote on last edited by
    #1

    Hello. I have a TextBox and I want , for instance, that when the user press the key "." the textbox displays a ",".´ I have a handler for KeyPress event and I know how to detect when the user pressed the key "." but I don-t know what I have to do to change it to the desired key value. Any ideas ? Thanks.

    R A 2 Replies Last reply
    0
    • J Jose Vicente

      Hello. I have a TextBox and I want , for instance, that when the user press the key "." the textbox displays a ",".´ I have a handler for KeyPress event and I know how to detect when the user pressed the key "." but I don-t know what I have to do to change it to the desired key value. Any ideas ? Thanks.

      R Offline
      R Offline
      Rahul Walavalkar
      wrote on last edited by
      #2

      I might be wrong, but why don't you call a javascript function on keypress of the textbox and pick up the text entered in the textbox and upon finding the "." character, replace it with the desired character and put the text back in the textbox. Cheers, Rahul I do not understand what I do. For what I want to do I do not do, but what I hate I do. - Romans 7:15

      1 Reply Last reply
      0
      • J Jose Vicente

        Hello. I have a TextBox and I want , for instance, that when the user press the key "." the textbox displays a ",".´ I have a handler for KeyPress event and I know how to detect when the user pressed the key "." but I don-t know what I have to do to change it to the desired key value. Any ideas ? Thanks.

        A Offline
        A Offline
        Alvaro Mendez
        wrote on last edited by
        #3

        Use the SelectedText property. This[^] may also help. Regards, Alvaro


        Can I ask you a question?

        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