|
-
Sep 16th, 2000, 12:47 PM
#1
Hi!
I am trying to make like a NotePad program. I'm now working with how to change fonts and weight, but the weight part isn't succesful. How can i make the text I have marked bold?
/ Erik
-
Sep 16th, 2000, 12:54 PM
#2
Don't use a regular textbox. Use a RichTextBox.
And here is the code to make the selected text bold:
Code:
Private Sub Command1_Click()
If RichTextBox1.SelText <> "" Then
If RichTextBox1.SelBold = False Then
RichTextBox1.SelBold = True
Else
RichTextBox1.SelBold = False
End If
End If
End Sub
-
Sep 16th, 2000, 01:00 PM
#3
Hi again!
Thanks for the help, but how do I create a RichTextBox?
/ Erik
-
Sep 16th, 2000, 01:17 PM
#4
Click on Project > Components... and make sure Microsoft Rich TextBox Control 6.0 (or whatever version you have) is checked.
-
Sep 16th, 2000, 07:01 PM
#5
Matthew: You can accomplish what you did much easier using the Not logic operator.
Code:
RichTextBox1.SelBold = Not RichTextBox1.SelBold
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
|