|
-
Sep 30th, 2000, 09:38 AM
#1
I have a ricktext box, and a combobox. The combobox is for changing the color of selected text within the richtextbox.
The problem is, I select the text I want to change the color of, but when I drop down the combobox, the Richtextbox loses focus and the text is deselected, is there a way to prevent this??
-
Sep 30th, 2000, 11:28 AM
#2
Private Sub combo1_Click()
RichTextBox1.SetFocus
End Sub
Private Sub combo1_Change()
RichTextBox1.SetFocus
End Sub
When you select the color, the RichTextBox will have the focus once again.
-
Sep 30th, 2000, 11:39 AM
#3
ok, but...
Does the selected text become unselected? if so, that whole process is pointless
-
Sep 30th, 2000, 05:42 PM
#4
Hyperactive Member
Add this code to your form code to keep the text selected:
Code:
Private Sub RichTextBox1_GotFocus()
RichTextBox1.HideSelection = False
End Sub
[Edited by dsy5 on 09-30-2000 at 07:12 PM]
-
Sep 30th, 2000, 07:35 PM
#5
Hyperactive Member
Sorry, code in the above post will not keep the text selected when you replace it. I'll keep trying to find a solution.
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
|