473,417 Members | 1,540 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,417 software developers and data experts.

Highlight text in a textbox

Cox
How would I go about highlighting text in a textbox?
Nov 15 '05 #1
5 56462

to select (highlight) characters 1 through 10 in a text box

textbox1.Select( 1, 10 );

I would suggest RTM for further information on this subject.

-Allen Anderson
http://www.glacialcomponents.com
On Mon, 6 Oct 2003 08:55:30 -0700, "Cox" <ra******@cox.net> wrote:
How would I go about highlighting text in a textbox?


Nov 15 '05 #2
Cox
Thanks Allen.
What, BTW, is RTM?

"Allen Anderson" <al***@sparkysystems.com> wrote in message
news:0p********************************@4ax.com...

to select (highlight) characters 1 through 10 in a text box

textbox1.Select( 1, 10 );

I would suggest RTM for further information on this subject.

-Allen Anderson
http://www.glacialcomponents.com
On Mon, 6 Oct 2003 08:55:30 -0700, "Cox" <ra******@cox.net> wrote:
How would I go about highlighting text in a textbox?

Nov 15 '05 #3
Cox,
I suspect in this context Read The Manual.

Although normally I use RTM for Release To Manufacturing.

Hope this helps
Jay

"Cox" <ra******@cox.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Thanks Allen.
What, BTW, is RTM?

"Allen Anderson" <al***@sparkysystems.com> wrote in message
news:0p********************************@4ax.com...

to select (highlight) characters 1 through 10 in a text box

textbox1.Select( 1, 10 );

I would suggest RTM for further information on this subject.

-Allen Anderson
http://www.glacialcomponents.com
On Mon, 6 Oct 2003 08:55:30 -0700, "Cox" <ra******@cox.net> wrote:
How would I go about highlighting text in a textbox?


Nov 15 '05 #4
Cox
I just tried the 'Select' with my app and it wasn't highlighted. The code:
private System.Windows.Forms.TextBox txtLeftOperand;

.......

txtLeftOperand.Select(1,2);

Any ideas on what I might be doing wrong? My environment is Visual Studio
..NET 2003

Mike

"Allen Anderson" <al***@sparkysystems.com> wrote in message
news:0p********************************@4ax.com...

to select (highlight) characters 1 through 10 in a text box

textbox1.Select( 1, 10 );

I would suggest RTM for further information on this subject.

-Allen Anderson
http://www.glacialcomponents.com
On Mon, 6 Oct 2003 08:55:30 -0700, "Cox" <ra******@cox.net> wrote:
How would I go about highlighting text in a textbox?

Nov 15 '05 #5
Hi,
to select (highlight) characters 1 through 10 in a text box

textbox1.Select( 1, 10 );


To get the present cursor psition you can use the textbox.SelectionStart
property (textbox1.Select( textbox.SelectionStart, 10 );).
If you use a richtextbox you will be able to change the color or font of the
selected text (richtextBox.SelectionColor, richtextBox.SelectionFont).

--
Mit freundlichen Gruessen - Regards

Ralph Gerbig
ik********@web.de
www.ralphgerbig.de.vu
Nov 15 '05 #6

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

Similar topics

2
by: Tony | last post by:
How can i highlight the whole text in a textbox control when a user tab or shift+tab into the control? Thanks Tony
1
by: Robert M | last post by:
Hello everybody, I am having a problem that I did not have before.. I can not highlight a text in a Textbox on a ASP.NEt form .. Can anybody help.. Thank you
2
by: parm | last post by:
How do I highlight text in my first (tabindex = 1) asp control (eg: textbox) on the webform on page load. If I try to set focus using javascript then I get script error "Cannot move focus to...
5
by: Atara | last post by:
I am trying to convert the following code to VB .Net, I still have some gaps (the lines that are marked with (*)) and also I need an ending condition for the while loop. any help would be...
0
by: abc my vclass | last post by:
which properties to focus automatic highlight text on text when on fous?
1
by: tranky | last post by:
Hola boys, i've a question for you! It's possible to highlight some text inside a textarea? (not all text, but a portion!) For example, i've this text inside a textarea. INSERISCI TESTO i...
5
by: Dave | last post by:
Is there a way to selectively highlight text in an OverLib popup? I'd like to be able to make some text stand out from the rest of the text that is displayed. I tried using a one-cell table with...
1
by: mbatestblrock | last post by:
I have no idea how to even phrase this.. I assume this is something easy. http://www.picment.com/articles/css/funwithforms/ just an example. When you highlight text with your mouse (as if you...
3
by: geosmy | last post by:
Hi everyone, Is it possible to highlight (a portion of the) text in a textbox without setting focus to it. What I'm interested is marking some portion of the text for reference while my cursor is...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.