?
Solved

TextBox scrollbar

Posted on 2004-10-20
4
Medium Priority
?
902 Views
Last Modified: 2010-05-18
Using vb.net 2002 code; how can I use a picturebox on the right side of a textbox to scroll the text into view 3 incriments at a time and another picturebox on the left to scroll it back again 3 incriments at a time.
0
Comment
Question by:teamdad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 2000 total points
ID: 12366618
What do you want to Scroll the TextBox on the Form or the Text within the Text Box.

Why no you use ScrollBars within the TextBox if your TextBox is multiline and you want it to be scrolled.

However if you want to click on a Picture Box and you want the Lines in a Multiline textBox to scroll you can even achieve that,
Set the Caret position to say the Third Line using TextBox1.SelectionStart and setting TextBox1.SelectionLength=0

and then call TextBox1.ScrollToCaret to scroll the text...

0
 

Author Comment

by:teamdad
ID: 12366752
I have tried the horizontal scrollbar in properties of the textbox and I set it to multiline and the scrollbar don't show up even if text is more than what can fit in the visible part of the textbox.  Suggestions on what might cause it / how to fix it or write a small working example of doing the caret position and scroll to caret.
0
 
LVL 19

Expert Comment

by:arif_eqbal
ID: 12366827
Well if ScrollBar is OK for you use that only avoid Scrolling to caret and all

Now For Showing Horizontal ScrollBar you need to set the WORDWRAP property to FALSE
0
 

Author Comment

by:teamdad
ID: 12373907
I'm still working with it..... does anyone have a working example of the TextBox1.ScrollToCaret way to scroll with a picturebox.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question