Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help me in Coding
Message
 
To
29/02/2000 12:24:15
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00334584
Message ID:
00339331
Views:
21
>Hi Eric,
> I am using RichTextBox for displaying a Report on the Screen as a View-Screen.
>In that I want to make some words Bold and also want to change the size of the
>word progrmaticlly. Can I use SelText property in this.
>e.g. Hello, I am Amol. In this I want to make Hello in Bold how should I do that?

This way:
Private Sub Command1_Click()
    With RichTextBox1
        .Text = "Hello, I am Amol"
        If InStr(1, .Text, "Hello") > 0 Then
            .SelStart = InStr(1, .Text, "Hello") - 1
            .SelLength = Len("Hello")
            .SelBold = True
            .SelStart = 0
        End If
    End With
End Sub
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform