Results 1 to 4 of 4

Thread: RichTextBox Curser

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2004
    Posts
    19

    Question RichTextBox Curser

    I am working on a computer simulator which when the application starts it simulates the boot of process of a device. Using a richtextbox I am able to display the bootup process, using a timer.

    But....What I need to be able to do is to get the curser to be displayed at the end (Scrolling down) and accept an input from the keyboard.


    For example the last line that I have is..

    RixhTextBox1.Text = "Login"

    I can not figure out how to get the RichTextBox to scroll to the last line, via code, place a curser after the text "Login" and then accept an input from the keyboard

    Thanks for any help, I would be willing to go about this anotherway if necessary.

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    you need to make sure the richtextbox's HideSelection property is set to " False " , then ...
    VB Code:
    1. richtextbox.SelectionStart = richtextbox.textLength
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2004
    Posts
    19

    Still not working

    I must be missing something here.

    I set the HideSelection property to False then used the following code:

    RichTextBox1.Text = "Test" & Chr(10) & "Test1:"

    RichTextBox1.SelectionStart = RichTextBox1.TextLength

    The result is:

    Test
    Test1

    What I am trying to get is a result of:

    Test
    Test1 _ (With a blinking cursor at the end and the ability to accept a keyboard input)

    Thanks

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2004
    Posts
    19

    Solved

    I engaged my brain

    Forget to add the following line at the end:

    Richtextbox1.focus()


    Thanks for your help

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