|
-
Oct 29th, 2003, 10:34 AM
#1
Thread Starter
Addicted Member
Control - font?
Is it possible e.g for label to set font style italic-underline?
regard j
-
Oct 29th, 2003, 10:56 AM
#2
VB Code:
ctrl.Font = New Font(ctrl.Font, FontStyle.Italic Or FontStyle.Underline)
-
Oct 29th, 2003, 10:58 AM
#3
Frenzied Member
Yes. You can do it at design time, or at runtime.
Code:
lblSample.Font = New Drawing.Font("FontName", FontSizeAsSingle)
~Peter

-
Oct 29th, 2003, 11:01 AM
#4
Frenzied Member
-
Oct 29th, 2003, 12:17 PM
#5
Thread Starter
Addicted Member
Ok, I know how to set font and one font style(regular,bold,italic,underline). But I want to set two font styles, e.g I want to set label text display like this 'label caption', again if it's possible.
regard j
-
Oct 29th, 2003, 12:26 PM
#6
Originally posted by Edneeis
VB Code:
ctrl.Font = New Font(ctrl.Font, FontStyle.Italic Or FontStyle.Underline)
You obviously didn't try the example posted (I don't mean to sound rude). To set more than one style at the sametime you use Or to add them together as shown.
Last edited by Edneeis; Oct 29th, 2003 at 12:39 PM.
-
Oct 29th, 2003, 12:52 PM
#7
Thread Starter
Addicted Member
Sorry Edneeis,
yes you are right, your first post is solution. Once again I apologize for my laziness.
regard j
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
|