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

Adding text to a richtext box and keeping vertical scroll bar at the bottom

Jon
If I add text to a rich text box, when there's too much to display, the vertical scroll bar stays at
the top. I'd like it to be at the bottom, so I can see the last item of text added. How do I do
this?
Nov 20 '07 #1
5 3494
On 20 Nov, 14:28, "Jon" <.wrote:
If I add text to a rich text box, when there's too much to display, the vertical scroll bar stays at
the top. I'd like it to be at the bottom, so I can see the last item of text added. How do I do
this?
richTextBox1.Text += DateTime.Now.ToString() + Environment.NewLine;
richTextBox1.SelectionStart = richTextBox1.Text.Length;
richTextBox1.ScrollToCaret();
Nov 20 '07 #2
Jon
Thanks for your reply DeveloperX and sorry for my late reply. I will try that.

Jon

"DeveloperX" <nn*****@operamail.comwrote in message
news:35**********************************@f3g2000h sg.googlegroups.com...
On 20 Nov, 14:28, "Jon" <.wrote:
If I add text to a rich text box, when there's too much to display, the vertical scroll bar stays
at
the top. I'd like it to be at the bottom, so I can see the last item of text added. How do I do
this?
richTextBox1.Text += DateTime.Now.ToString() + Environment.NewLine;
richTextBox1.SelectionStart = richTextBox1.Text.Length;
richTextBox1.ScrollToCaret();
Nov 21 '07 #3
Hi Jon,

Have you tried the solution provided by DeveloperX? Does it work for you?
If you still need any help, please feel free to feedback, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 27 '07 #4
Jon
Sorry for the late reply Jeffrey, I was busy fixing more urgent things.

I've now tried DeveloperX's solution and it works fine.

Jon
""Jeffrey Tan[MSFT]"" <je***@online.microsoft.comwrote in message
news:$H**************@TK2MSFTNGHUB02.phx.gbl...
Hi Jon,

Have you tried the solution provided by DeveloperX? Does it work for you?
If you still need any help, please feel free to feedback, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Nov 29 '07 #5
Hi Jon,

Thanks for your confirmation. If you need further help, please feel free to
post, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
Nov 30 '07 #6

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

Similar topics

7
by: Jane Austine | last post by:
As you add more items, say text lines, in Text widget, it gets too slow and almost impractical to use on. Take idle for example. If the text gets bigger(e.g. print...
3
by: AES/newspost | last post by:
Just been involved with a web site where clicking a button on the main page opened a second (or secondary) window intended to function like a dialog box in Apple GUI jargon. (The primary page was...
3
by: Tony Benham | last post by:
I've added a footer div to a website, which I've positioned using div#footer {width : auto ; border : 0 ; position : absolute ; bottom : 0 ; margin : 1.33em 1.33em 1.33em 1.33em ; background :...
4
by: PK9 | last post by:
I have a button at the top of my page that I have an onClick event handler for which makes some new controls (at the bottom of my page) visible. When the user clicks the button I make the new...
2
by: Gene Hubert | last post by:
I'm assigning a new datasource (a datatable) to a datagrid that is aready displayed in a form. Then I assign a new value to CurrentRowIndex. The datagrid always scrolls so that the new current...
9
panachepad
by: panachepad | last post by:
I arrived here from a websearch that found this thread from your archives: http://www.thescripts.com/forum/thread97805.html It helped me to understand that I am on the right track, but I still have...
8
by: cj | last post by:
I use multi-line text boxes with vertical scroll bars in several of my programs to display log information as the programs run. Once the text more than fills the visible portion of the textbox I...
1
by: swc76801 | last post by:
I desperately need help. My understanding of CSS is non-existent. I have a store http://astore.amazon.com/texasheat-20 with Amazon.com. According to the information from Amazon.com "Write your own...
2
by: Sean Liming \(MVP\) | last post by:
I have a communication program using the SerialPort control. The application performs the serial read in sPort_DataReceived thread and data is displayed in a RichTextBox using the callback/invoke...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.