473,387 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

show selected text in a textbox

Hi,

I have a big multiline Textbox with scrollbars. I want to be able to look
for a substring in the textbox, and select it. So far no problem.

But: when the selected piece of text in the textbox isn't visible, I want it
to be visible! So I need to let the scrollbars scroll until the selected
text is visible or something like that. Is there a function liek that in
VB.NET? Or how can I accomplish this?

Thanks a lot,

Pieter
Nov 20 '05 #1
3 3399
Use on-line help and search for

Q68572
Regards - OHM
DraguVaso wrote:
Hi,

I have a big multiline Textbox with scrollbars. I want to be able to
look for a substring in the textbox, and select it. So far no problem.

But: when the selected piece of text in the textbox isn't visible, I
want it to be visible! So I need to let the scrollbars scroll until
the selected text is visible or something like that. Is there a
function liek that in VB.NET? Or how can I accomplish this?

Thanks a lot,

Pieter


--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com
Nov 20 '05 #2
* "DraguVaso" <pi**********@hotmail.com> scripsit:
I have a big multiline Textbox with scrollbars. I want to be able to look
for a substring in the textbox, and select it. So far no problem.

But: when the selected piece of text in the textbox isn't visible, I want it
to be visible! So I need to let the scrollbars scroll until the selected
text is visible or something like that. Is there a function liek that in
VB.NET? Or how can I accomplish this?


Set the focus to the control and call its 'ScrollToCaret' method.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Thanks a lot!!

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:#1**************@TK2MSFTNGP09.phx.gbl...
* "DraguVaso" <pi**********@hotmail.com> scripsit:
I have a big multiline Textbox with scrollbars. I want to be able to look for a substring in the textbox, and select it. So far no problem.

But: when the selected piece of text in the textbox isn't visible, I want it to be visible! So I need to let the scrollbars scroll until the selected
text is visible or something like that. Is there a function liek that in
VB.NET? Or how can I accomplish this?


Set the focus to the control and call its 'ScrollToCaret' method.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
3
by: Patrick De Ridder | last post by:
My textBox comes on with all the text selected. Setting "hide selection" to "true" or using SelectedText or SelectedTextLength will not stop the highlighting. How do I get rid of the text pre-...
11
by: Santosh | last post by:
Dear all , i am writting following code. if(Page.IsPostBack==false) { try { BindSectionDropDownlist();
8
by: Jeanette White | last post by:
I am trying to create a custom validator to validate that if "Other" is selected from a drop downdown list then a textbox is displayed and a comment is required. The display textbox piece is...
0
by: rehanmomin | last post by:
Just to start off, I am writing a web application using C#. I have a Menu which is binded to an XML datasource. There are three menu items each with submenus and a textbox where I want to display...
3
by: jerrydigital | last post by:
good evening, I am trying to allow my users to enter in text if they don't find their option on my drop down menu. In the code below, I can get a text box to show up when I select 'Other' on the...
2
by: s2008 | last post by:
Hello, In my page i have two textboxes and a html button. I'm using vb.net 2.0 . what i need is i want whatever text selected in the textbox1 to be hyperlinked when clicked the button... this is...
5
by: temijojo | last post by:
Hello, Can someone help me in this problem. In my content page, I used 2 user controls inside an Ajax Toolkit TabControl. One of the user controls is a data entry with a dropdownlist. The...
5
by: nzkks | last post by:
Hi I am using these: ASP.Net 2.0, VB.Net, Visual Studio 2005, SQL Server 2005, Formview controls In a ASP.Net form I have 20 textboxes and 20 dropdownlists(ddl). All ddl(s) are databound and get...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.