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
Solved

TextBox scrollbar

Posted on 2004-10-20
4
896 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

840 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