473,396 Members | 1,975 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,396 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 56457

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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.