XTab's Blog - Mix and Match Fonts on a Label Control in VB 2005
"A recent post in the VBCityForums has just reminded me of a technique that I meant to blog, but don't think I ever got round to doing. This is to show how you can customise a label so that you can have text that uses different fonts on the same label.
Normally of course, you set the font and forecolor in the Properties Window at design time, although you can also set or change them at run time too via the Font and ForeColor properties. But the key thing is that you can only have one font, one font size, one text color and one fontstyle for the whole label if you do this.
So what happens if you want to create something that has, for instance, a heading in red text - bold style and underlined and a second line with a message in black text - regular style font ?
...
This could come in handy.
I usually take the uber-lazy approach and just use different labels, but this makes it look so easy that I should think of doing it this way...
(via vbfeeds - Mix and Match Fonts on a Label Control in VB 2005)
No comments:
Post a Comment
NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...
ALL comments are moderated. I will review every comment before it will appear on the blog.
Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...
I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...
Please see my comment policy for more information if you are interested.
Thanks,
Greg
PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...