Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Richtextbox.selbold = boolean
Message
 
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00568191
Message ID:
00568496
Views:
16
Hi!
The last string in your code:
.Text = .Text & " requested by " & nick & " <<<"
loads a new content of RichTextBox and it discards all formatting.
Try to set a font after loading a text into RichTextBox:
Dim pos As Integer
With RichTextBox1
   'add ">>> VERSION" to richtextbox
   .Text = "Some text before " & vbCrLf & ">>> VERSION"
   pos = Len(.Text) - 7
   'add some text after "VERSION"
   .Text = .Text & " requested by <<<"
   'select text "VERSION"
   .SelStart = pos
   .SelLength = 7
   'bold text "VERSION"
   .SelBold = True
End With
>here's my problem
>
>
>With IRCform.ActiveForm.txtOutput
>   .Text = IRCform.ActiveForm.txtOutput.Text & ">>> VERSION"
>   'add ">>> VERSION" to richtextbox
>   'select text "VERSION"
>   .SelStart = Len(IRCform.ActiveForm.txtOutput.Text) - 7
>   .SelLength = 7
>   'bold text "VERSION"
>   .SelBold = True
>   'add some text after the bolded "VERSION"
>   .Text = .Text & " requested by " & nick & " <<<"
>   '&¤!#%"!& the "VERSION" text isn't bold anymore :/
>End With
>
>
>so you got the idea? could someone tell what's wrong, or a similar way of doing this...
Previous
Reply
Map
View

Click here to load this message in the networking platform