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. RichTextBox with MaximumLine Limit

RichTextBox with MaximumLine Limit

Scheduled Pinned Locked Moved C#
comquestion
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.
  • A Offline
    A Offline
    Anindya Chatterjee
    wrote on last edited by
    #1

    I want to have a richtextbox control with maximum line limit. More briefly a FIFO functionality in a richtextbox control. After a maximum number of line, the first line will be removed and so on. How would I achieve this? any idea? Thanks in advance.

    Anindya Chatterjee -------------------------------------------------------- 1. Don't Visit ..[^] 2. But Watch ..

    L C 2 Replies Last reply
    0
    • A Anindya Chatterjee

      I want to have a richtextbox control with maximum line limit. More briefly a FIFO functionality in a richtextbox control. After a maximum number of line, the first line will be removed and so on. How would I achieve this? any idea? Thanks in advance.

      Anindya Chatterjee -------------------------------------------------------- 1. Don't Visit ..[^] 2. But Watch ..

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Count the number of lines before adding a new one. If you're beyond the maximum of entries allowed, ditch the last line :)

      1 Reply Last reply
      0
      • A Anindya Chatterjee

        I want to have a richtextbox control with maximum line limit. More briefly a FIFO functionality in a richtextbox control. After a maximum number of line, the first line will be removed and so on. How would I achieve this? any idea? Thanks in advance.

        Anindya Chatterjee -------------------------------------------------------- 1. Don't Visit ..[^] 2. But Watch ..

        C Offline
        C Offline
        carlecomm
        wrote on last edited by
        #3

        There is an event to catch it. When the text changes, the event will be handled. Then you check the lines of the richtextbox.

        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