auto scroll text box
-
25 Februari 2012 6:17ok, so i have read thousand of threads but they dont help me at all. i am making a instant messenger type program that is ran through a text file and a timer that makes the textbox in my program reload every millisecond. if the text in the fill gets to long i have a scroll bar added to my textbox, the problem is the textbox wont autoscroll and i cant use the textbox.selectionstart = textbox.textlength and textbox.scrolltocaret because the textbox is read only and i have it set so that it the mouse doesnt go on the textbox, i probably gave way to little discription or way to much but does anyone got any idea's?
Semua Balasan
-
25 Februari 2012 8:46
alright although this took me a all night to figure out i have figured this out, for those of you with a similar question do this, create a timer that has its tick count set to one then under the timer tick event add this
fileviewer.SelectionStart = fileviewer.TextLength
fileviewer.ScrollToCaret()
that way the timer acts as a kind of always event so it is always placing the scroll at the bottom
- Ditandai sebagai Jawaban oleh kyronfelinus 25 Februari 2012 8:47