Results 1 to 4 of 4

Thread: Winsock chat textbox prob.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2008
    Posts
    116

    Winsock chat textbox prob.

    Hey again,

    Couple things I am having probs with and I think I can probably find out a couple on my own but I can't find a solution to this prob.

    When My text box fills up, the scroll bar doesnt automatically move with the new incoming text. How do I get it to show the most recent incoming text?

    Thanks.

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Winsock chat textbox prob.

    Something like

    Code:
    Text1.SelStart = Len(Text1.Text)
    Where the cursor will be moved to the last position of the text thereby moving the scrollbar so the last item becomes viewable.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Winsock chat textbox prob.

    Quote Originally Posted by Goaty
    When My text box fills up, the scroll bar doesnt automatically move with the new incoming text. How do I get it to show the most recent incoming text?
    That is the built in, default, behavior of a standard textbox.

    I addition to what dee-u posted, you also might want to add
    Code:
    Text1.SelStart = Len(Text1.Text)
    Text1.SelText = newString

  4. #4
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Winsock chat textbox prob.

    You can also load lines into a Textbox in reverse order so that the last line entered is at the beginning of the textbox instead of at the bottom. This way the verticle scrollbar always remains at the top. The choise is yours.

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