Results 1 to 2 of 2

Thread: richtextbox question...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Ca
    Posts
    106
    Sorry for putting up series of richtextbox questions... anyways.. if you have three rtf boxes in your form, and user clicks the cmdCopy, which should copy the selected text, how do you know which rtfboxes to get the text from?

  2. #2
    Guest
    I came up with an idea, and it worked.

    Code:
    Dim rtbfocus As String
    
    Private Sub Command1_Click()
    Clipboard.Clear
    Clipboard.SetText rtbfocus
    End Sub
    
    Private Sub RichTextBox1_GotFocus()
    rtbfocus = RichTextBox1.Text
    End Sub
    
    Private Sub RichTextBox2_GotFocus()
    rtbfocus = RichTextBox2.Text
    End Sub
    
    Private Sub RichTextBox3_GotFocus()
    rtbfocus = RichTextBox3.Text
    End Sub

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