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. textbox control managing behaviour of editing content

textbox control managing behaviour of editing content

Scheduled Pinned Locked Moved C#
help
2 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.
  • W Offline
    W Offline
    Witoldek
    wrote on last edited by
    #1

    Hello everyone, Im wondering if its possible to make my control behave in the way described below: during editing text when user types enter normally cursor moves to the next line creating new emtpy line and then user can keep on writing. I would like to make it possible to move to another line by typeing enter only when the current line contains 10 characters. Hope taht my description of the problem is clear, thanks for any hint, Witek

    A 1 Reply Last reply
    0
    • W Witoldek

      Hello everyone, Im wondering if its possible to make my control behave in the way described below: during editing text when user types enter normally cursor moves to the next line creating new emtpy line and then user can keep on writing. I would like to make it possible to move to another line by typeing enter only when the current line contains 10 characters. Hope taht my description of the problem is clear, thanks for any hint, Witek

      A Offline
      A Offline
      Anthony Mushrow
      wrote on last edited by
      #2

      Use the KeyDown event, inside check if the Return key was pressed. If it was then you can check how many characters are in the current line. If there are not enough characters in the line then set e.Handled to true to ignore key.

      My current favourite word is: Nipple!

      -SK Genius

      Game Programming articles start -here[^]-

      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