DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Dec 2005
    Posts
    1

    Multiline textbox, scrolling to a Line and editing Line

    I've two multiline textboxes side by side in a Windows form. One of them [tb2] display text parsed from other textbox [tb1] (which in turn get populated from file, or user fills it by typing) I can create a TextChanged event for textbox [tb1] and display parsed text in textbox [tb2], as a whole chunk. Few problems I face:
    1. Every time text changes in textbox [tb1] textbox [tb2] scroll bar reset to original top position. How can I programatically scroll Textbox [tb2] to a logically related line number of text that changed in Textbox [tb1]
    2. It is not a good idea to flush whole text from textbox [tb1] to [tb2] everytime something changes in [tb1]. Is there anyway to edit a Line of Textbox?

    I hope someone here will be able to help me out.

    good day!

    --
    I'm using C# Express Edition 2005

  2. #2
    Join Date
    Jul 2006
    Posts
    14
    Set the cursor position then type...

    textBox1.ScrollToCaret();

    Will scroll the textbox to the cursor position.

Similar Threads

  1. Interactive line editing
    By mjjw in forum C++
    Replies: 2
    Last Post: 02-14-2005, 10:14 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links