|
-
Oct 3rd, 2000, 05:16 AM
#1
Thread Starter
Evil Genius
Code:
text1.fontbold
text1.fontitalic
text1.fontunderline
No problems, the above I can do to make all the text in a box bold, italic, underline etc.
If I wanted just the selected highlighted text to be bold if I click a commandbutton, I think I have to use the seltext option, so I have been trying :
Code:
text1.seltext.fontbold
which does not work, all I have left to put here then is HHHHEEEEELLLLPPPPPP!!!!!! (please, alright then, pretty please).
-
Oct 3rd, 2000, 05:26 AM
#2
Lively Member
Probably because I dont think a textbox can be used that way. You can have one setting for one textbox. That is one font, one color, etc...
RichText-control on the other hand has what you need.
-
Oct 3rd, 2000, 06:22 AM
#3
As Thomas Halsvik said, use a RichTextBox. Here is a code can use for it as well:
Code:
Private Sub Command1_Click()
If RichTextBox1.SelText <> "" Then
RichTextBox1.SelBold = Not RichTextBox1.SelBold
End If
End Sub
This will highlight whatever item is selected. If it's highlighted again while it's bold, when you click the command button, it will make the text not bold anymore.
-
Oct 3rd, 2000, 07:10 AM
#4
_______
<?>
As stated it won't work on seltext but on a text box
it is not as you stated, you must give it a value.
Correct Way.
Text1.FontBold = True
Text1.FontItalic = True
Text1.FontUnderline = True
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Oct 3rd, 2000, 08:17 AM
#5
Thread Starter
Evil Genius
Thank you, spotted that one though (I was writing from memory - which I have little sane amounts of).
Will use the rich text box then, thankx everyone!
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
|