|
-
Jan 7th, 2009, 05:29 PM
#1
Thread Starter
New Member
Question about Focus and selectionstart
hey everyone,
Private Sub rtbreceive_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rtbOntvangen.TextChanged
rtbreceive.SelectionStart = rtbreceive.TextLength
rtbreceive.ScrollToCaret()
rtbreceive.Focus()
End Sub
rtbreceive = a richtextbox
Would someone give some explanation what a .Focus and .Selectionstart do?
Last edited by Arash; Jan 7th, 2009 at 05:34 PM.
-
Jan 7th, 2009, 05:36 PM
#2
Re: Question about Focus and selectionstart
You could just look them up in the documentation?
Anyway... Off the top of my head, SelectionStart gets or sets the cursor position (in character numbers), and Focus is a VB6 left-over that sets the focus to the control. I believe you should now use either control.Select, or Me.ActiveControl = control.
Last edited by NickThissen; Jan 7th, 2009 at 05:51 PM.
-
Jan 7th, 2009, 05:38 PM
#3
Thread Starter
New Member
Re: Question about Focus and selectionstart
Thx i get it know
-
Jan 7th, 2009, 05:49 PM
#4
Re: Question about Focus and selectionstart
.Focus is not something to use normally, as you probably read. Use .Select instead.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|