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. Scroll synchronization of two RichTextBox controls

Scroll synchronization of two RichTextBox controls

Scheduled Pinned Locked Moved C#
csharpwpf
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.
  • H Offline
    H Offline
    hain
    wrote on last edited by
    #1

    In a forms-based application, I would like to synchronize two RichTextBox controls so that one without a vertical scroll bar will scroll in synch with the other one (which has a vertical scroll bar). I.e., I want to be able to scroll both controls with one scroll bar. Thanks for any suggestions, Tom P.S. I saw Karin Huber's article, but this is for WPF and Silverlight.

    A A 2 Replies Last reply
    0
    • H hain

      In a forms-based application, I would like to synchronize two RichTextBox controls so that one without a vertical scroll bar will scroll in synch with the other one (which has a vertical scroll bar). I.e., I want to be able to scroll both controls with one scroll bar. Thanks for any suggestions, Tom P.S. I saw Karin Huber's article, but this is for WPF and Silverlight.

      A Offline
      A Offline
      April Fans
      wrote on last edited by
      #2

      You can build a user control (or custom control), and handle the scroll event in another RichTextBox.

      April Comm100 - Leading Live Chat Software Provider

      1 Reply Last reply
      0
      • H hain

        In a forms-based application, I would like to synchronize two RichTextBox controls so that one without a vertical scroll bar will scroll in synch with the other one (which has a vertical scroll bar). I.e., I want to be able to scroll both controls with one scroll bar. Thanks for any suggestions, Tom P.S. I saw Karin Huber's article, but this is for WPF and Silverlight.

        A Offline
        A Offline
        AspDotNetDev
        wrote on last edited by
        #3

        "Scrolling Around with the RichTextBox Control" discusses how to do that in VB, and there is a C# translation in a message at the bottom of the article.

        [Forum Guidelines]

        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