Solved

TextBox scrollbar

Posted on 2004-10-20
4
897 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
  • 2
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 500 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

730 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