|
-
Sep 30th, 2000, 04:40 PM
#1
I have a richtextbox. In my Richtext_Change() code I have this:
Richtext.SelStart = 0
So that the text is inputted backwards. My problem is this,
When I try to select text to make bold, it works, but the cursor is then sent back to 0, instead of the selected text remaining selected. I tried this in my Richtext_selChange() code:
Dim sLength as integer
Dim sStart as integer
sLength = Richtext.Sellength
sStart = Richtext.SelStart
and then this code at the top of the Richtext_change() module:
if (Richtext.selLength = 0) then
Richtext.SelStart = 0 'the code at the top
Else
Richtext.selStart = sStart
Richtext.selLength = sLength
End If
but is doesn't work, any ideas to keep the text selected?
-
Sep 30th, 2000, 04:53 PM
#2
Well, assuming you have a control to change it into bold, add this to the end of it:
Code:
.
.
.
formatchg = True
.
.
.
and add this to Richtext_Change():
Code:
.
.
.
If formatchg = True then
formatchg = False
End Sub
End If
.
.
.
and dont forget this at the beginning:
Code:
...
Public formatchg As Boolean
.
.
.
Hope it helps .
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
|