Results 1 to 3 of 3

Thread: [RESOLVED] Auto Scroll a textbox

  1. #1

    Thread Starter
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Resolved [RESOLVED] Auto Scroll a textbox

    Hi all,

    Heres my problem, My app outputs info into a textbox as a log and appends the new lines to the end of the textbox, is there a way i can scroll the textbox so it displays the end of the text? I had considered writing the line at the top and appending the rest of the data to it but the line is hard to do this way (it uses info from 2 seperate subs and would need a global or a new textbox) and ideally i would like the info at the end in chronological order. the textbox is refreshed at the end of each entry.
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

  2. #2
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: Auto Scroll a textbox

    Rather than using a textbox ou could use a listview control in list or details mode, add each new line as a new item and then use the listview's ensurevisible method to make sure that the new item is shown (ie it will scroll to the new item at the bottom as each one is added)

  3. #3

    Thread Starter
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: Auto Scroll a textbox

    Quote Originally Posted by keystone_paul View Post
    Rather than using a textbox ou could use a listview control in list or details mode, add each new line as a new item and then use the listview's ensurevisible method to make sure that the new item is shown (ie it will scroll to the new item at the bottom as each one is added)
    Good solution hadn't even considered listview.
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width