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

how to set the carret to the end of a text box (or automatic scroll)

Hi group,

i'm setting a (long) string in my textbox
textBox1.Text += s + Environment.NewLine;

but if the text is longuer than the visible capacity of the textbox, I
can't see the end of my text (that is the most important), even if the
scrollbar is set.

I would like to see automatically the end of the textbox

how can i do ?

thanks for your answer

N.

Apr 6 '07 #1
4 4454
Will the WordWrap porperty be useful?
ti*********@gmail.com 写道:
Hi group,

i'm setting a (long) string in my textbox
textBox1.Text += s + Environment.NewLine;

but if the text is longuer than the visible capacity of the textbox, I
can't see the end of my text (that is the most important), even if the
scrollbar is set.

I would like to see automatically the end of the textbox

how can i do ?

thanks for your answer

N.
Apr 6 '07 #2
Will the WordWrap property be useful?
And don't forget the ScrollBars.Vertical property.
Hope that this will help.

ti*********@gmail.com 写道:
Hi group,

i'm setting a (long) string in my textbox
textBox1.Text += s + Environment.NewLine;

but if the text is longuer than the visible capacity of the textbox, I
can't see the end of my text (that is the most important), even if the
scrollbar is set.

I would like to see automatically the end of the textbox

how can i do ?

thanks for your answer

N.
Apr 6 '07 #3
Hi N,

You can set the caret position by setting the TextBox.SelectionStart property. To set the caret to the end of the text use

textBox1.SelectionStart = textBox1.TextLength;
textBox1.ScrollToCaret();
On Fri, 06 Apr 2007 14:54:55 +0200, <ti*********@gmail.comwrote:
Hi group,

i'm setting a (long) string in my textbox
textBox1.Text += s + Environment.NewLine;

but if the text is longuer than the visible capacity of the textbox, I
can't see the end of my text (that is the most important), even if the
scrollbar is set.

I would like to see automatically the end of the textbox

how can i do ?

thanks for your answer

N.



--
Happy coding!
Morten Wennevik [C# MVP]
Apr 6 '07 #4
On 6 avr, 15:24, "Morten Wennevik [C# MVP]"
<MortenWenne...@hotmail.comwrote:
Hi N,

You can set the caret position by setting the TextBox.SelectionStart property. To set the caret to the end of the text use

textBox1.SelectionStart = textBox1.TextLength;
textBox1.ScrollToCaret();

On Fri, 06 Apr 2007 14:54:55 +0200, <timor.su...@gmail.comwrote:
Hi group,
i'm setting a (long) string in my textbox
textBox1.Text += s + Environment.NewLine;
but if the text is longuer than the visible capacity of the textbox, I
can't see the end of my text (that is the most important), even if the
scrollbar is set.
I would like to see automatically the end of the textbox
how can i do ?
thanks for your answer
N.

--
Happy coding!
Morten Wennevik [C# MVP]- Masquer le texte des messages prcdents -

- Afficher le texte des messages prcdents -

Thanks Morten,
this solves my problem

Best regards,

N.

Apr 6 '07 #5

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

Similar topics

3
by: Emil Dotchevski | last post by:
I have a table that is at 100% width, which contains a <TD> that is 80% of that. In the <TD> I want to put pre-formatted text (the output from a C++ compiler, to be more precise) and I'd like the...
5
by: netsurfer | last post by:
Hi I have a question regarding making scrolling text appear at the bottom a website page...(I mean below the actual body of the webpage...which I believe is refered to as the status bar?) I...
1
by: Jesper | last post by:
Hi, Is it possible to scroll a RichTextBox programmatically to a given text selection in it, such that the selected text becomes viewable. regards. Jesper.
5
by: Will Gillen | last post by:
I need to have a "scrolling" text label or textbox at the bottom of my window to show the URL of where a song is being played from. I want the text to scroll on a single line from left to right in...
2
by: gbayo1 | last post by:
Hi, I was just wondering would anybody be able to show us how to use a button, that when pressed, automatically scrolls a JSlider across say from 0 - 100 at a certain speed or whatever. If anyone...
1
by: jadeite100 | last post by:
Hi: I have an pop-up window with an Iframe that has a text box with scrolldown. The scrolldown in the popup-window does not work but the scroll-down for the iFrame works. The strange thing is I...
1
by: Bishman | last post by:
Hi, I have been trying to get text to scroll smoothly accross a windows form using GDI+ and a timer. Changing the position of the text by a configurable amount and calling invalidate to force a...
0
by: reedpgh | last post by:
I have a wordpress theme I customized. View this link in Internet Explorer: http://krobarultralounge.com/ See the images won't scroll in I.E. but the text does ... img's and text do scroll in...
4
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
Hi I am pretty new to asp.net gridviews. I need to get the text in one column to scroll, I have little screen space and one column is normally empty, but is sometimes quite long. Has...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.