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

Vertical Scrollbar

2
Hi,
I have a multilined textbox in a chat program, this textbox recieves incoming messages and shows them to the user. The problem is with the vertical scrollbar.
Every time a new message appears in the textbox the scrollbar goes up to the top of the textbox while the message is being shown in the bottom.

So I wonder how you would do to make the scrollbar go down to the bottom when the user recieves a new message.

Thanks in advance.
May 1 '07 #1
3 1502
Killer42
8,435 Expert 8TB
I think the simplest thing is to move the insertion point (the "text cursor") to the end of the text. Something like this...
Expand|Select|Wrap|Line Numbers
  1. Text1.SelStart = Len(Text1.Text)
(Note that you can actually set it to any sufficiently high number. If you try to go past the end of the text, it's not a problem - Windows just stops at the end.)
May 1 '07 #2
PatruX
2
Works like a charm, thanks.
May 1 '07 #3
Killer42
8,435 Expert 8TB
Works like a charm, thanks.
Cool! Glad to help. :)
May 2 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Don Schneider | last post by:
I tried to setup a frameset which consists of 4 different subframes. Each of these subframes should fetch a different web page from the internet and display it completely (!). BUT: the vertical...
4
by: Rob T. | last post by:
I am using a div tag to make an element that contains some text. I have specified overflow: auto; in my stylesheet. If I use font-size/line-height to specify the font information I get a vertical...
3
by: buht | last post by:
Hello Everyone, Fairly new to c# here and have a question regarding scrollbars, particularly a vertical scrollbar. It looks like my options are restricted for the textbox scrollbars being...
0
by: Gene Hubert | last post by:
I've got two treeviews side by side on a panel on a form. They each have about 20 nodes in them. The treeview on the right has a vertical scrollbar. The treeview on the left needs a vertical...
4
by: ShaneO | last post by:
In a Windows Form I have a RichTextBox with Multiline = True and ScrollBars = Vertical. As expected, when Text is loaded into the RTB the Vertical ScrollBar will appear if needed. Does anyone...
0
by: jazeelkm | last post by:
hi, i am a beginer in the world of C# 1. I want to hide the vertical scrollbar of a listbox . In properties i can hide the horizontal scrollbar , but there s no option for vertical scroll...
1
by: platoon1sc | last post by:
Hi guys.I have a problem with Internet Explorer in my web-application. I have a vertical scrollbar into my jsps but firefox show the vertical srollbar, but IE doesn't. IE show a blank space where...
1
by: bai | last post by:
In my page, I have both horizontal and vertical scroll bars. I want to to some action on Vertical scrollbar click/move and some other action on horizontal scrollbar move/click. How to know whether...
1
by: Tom | last post by:
First, I posted a similar request for help in another group and now don't find the posting. Problem with my newsreader perhaps ... but apologies if this appears as a cross posting. My code is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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...

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.