473,804 Members | 3,094 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3504
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.Te xt += DateTime.Now.To String() + Environment.New Line;
richTextBox1.Se lectionStart = richTextBox1.Te xt.Length;
richTextBox1.Sc rollToCaret();
Nov 20 '07 #2
Jon
Thanks for your reply DeveloperX and sorry for my late reply. I will try that.

Jon

"DeveloperX " <nn*****@operam ail.comwrote in message
news:35******** *************** ***********@f3g 2000hsg.googleg roups.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.Te xt += DateTime.Now.To String() + Environment.New Line;
richTextBox1.Se lectionStart = richTextBox1.Te xt.Length;
richTextBox1.Sc rollToCaret();
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.m icrosoft.comwro te in message
news:$H******** ******@TK2MSFTN GHUB02.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
10711
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 urllib.urlopen('http://www.amazon.com').read() ), it becomes too sluggish to use as an "interactive" shell. I have tried wxPython and it seems to have the same problem (from my experience using PyCrust). Is there any way to speed up Text widget, or should I look for another
3
10224
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 a private nonprofit organization's home page and the secondary window was actually an election ballot.) The secondary window opened smaller than the primary page, both vertically and horizontally, with a vertical scroll bar which had the usual...
3
5700
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 : teal ; font-size : 75% ; color : white ;} This appears to create a full width bar in IE6/netscape7.1, and a small bar on the left in opera 7.11, which is placed at the bottom of the browser window, even though the content may be longer than the...
4
3138
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 controls visible in the onclick event handler, but I do not know how to bring the focus to the bottom section of the page. So basically, when the user clicks the button, everything works correctly in the onclick (all controls are made visible),...
2
3338
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 row is visible. However, the vertical scrollbar does not always adjust accordingly. Upon the first instance of assigning a new datasource and setting the currentrowindex to the _last_ record, the part of the vertical scrollbar that can be...
9
5135
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 one problem surrounding this issue. I am trying to make a <div> block that contains a) a link b) an arrow or an image of an arrow c) another link d) another link floated off to the far right All of this must be on one horizontal line. The...
8
3771
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 would like the text box to show the bottom of the text in it. Right now even if I scroll down in the text box to see what's the latest activity when new text is added the textbox resets itself to show only the top text and I have to scroll down...
1
19675
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 overriding CSS to customize your aStore." Their setup page is divided into two sections. On the right they show the existing CSS. On the left there is a box where you can add the new code. They have tabs for "Global", "Category Page", "Detail Page",...
2
2350
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 routine. The Vertical control scroll bar is enabled so the user can scroll up and down to see the data that has scrolled. As data is comming, the Vertical scroll bar jumps to the top. I would like to see the Vertical scroll bar position itself...
0
9569
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10318
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10302
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9130
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7608
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6844
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5503
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2975
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.