change font color, type,or style

  • Thread starter Thread starter beetdocta
  • Start date Start date
B

beetdocta

hello i was wondering is it possible in visual basic .net to change the
color of certain words or phrases without changing the color of all the
text in the lable or without having to create a new lable specificly
for that word or phrase

thanx
 
I have actually seen someone do that but are not sure of the article URL.

One thing you could do is use a LinkLabel & you are able to set the colour
of the links. Make the first link colour different from the others to
achieve this. Its not a fantastic idea, but its simple enough to do

==================================

Please Note:

Spoof your e-mail unless you fancy getting loads of SPAM

==================================

Crouchie1998
BA (HONS) MCP MCSE
 
hello i was wondering is it possible in visual basic .net to change the
color of certain words or phrases without changing the color of all the
text in the lable or without having to create a new lable specificly
for that word or phrase

You may want to use a richtextbox control instead of the label to display
rich-text:

\\\
With Me.RichTextBox1
.BorderStyle = BorderStyle.None
.BackColor = SystemColors.Control
.Enabled = False
.Text = "Bla Bla Bla Bla Bla Bla Bla Bla"
.SelectAll()
.SelectionColor = SystemColors.ControlText
.Select(10, 5)
.SelectionColor = Color.Red
End With
///
 
Hi,

You can do what you are talking about with the richtextbox
control

RichTextBox1.Text = "Some bold text and some regular."

RichTextBox1.Select(0, 15)

RichTextBox1.SelectionFont = New Font(Me.Font, FontStyle.Bold)

RichTextBox1.SelectionColor = Color.Red



Ken
 
thank you so much ive been trying to figure out how to do this for like
the past week and had like 5 people tell me it was impossible but i got
1 other quick question is there a way i could make the rich text box
unexcesable to the user so thy can not change delete or edit the font
but still make it viewable

thanx
 
thank you so much ive been trying to figure out how to do this for like
the past week and had like 5 people tell me it was impossible but i got
1 other quick question is there a way i could make the rich text box
unexcesable to the user so thy can not change delete or edit the font
but still make it viewable

You could read my reply where these questions are answered.
 
sorry but now i cant access my scroll bar is there a way i could fix
this without creating a new scroll bar object

thanx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top