|
-
Jan 27th, 2004, 07:09 AM
#1
Thread Starter
New Member
Changing font properties on a label control ... um, help?
I didn't think this was going to be such a freakin' issue. I want to be able to change the font size on a label after getting input from another form. I've already handled all of the activation issues - but I can't for the life of me figure out how to change the font properties on the label. Do I just need to destroy the one that's there and make a new one?
All of the .font properties are read-only. Where the heck do I *set* the damn things?
-
Jan 27th, 2004, 07:42 AM
#2
VB Code:
Dim f As New Font("arial", 16)
Label1.Font = f
This world is not my home. I'm just passing through.
-
Jan 27th, 2004, 07:44 AM
#3
Better still...
VB Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim str As String = Label1.Font.Name
Dim size As Integer = Label1.Font.Size
Dim f As New Font(str, size + 1)
Label1.Font = f
End Sub
This world is not my home. I'm just passing through.
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
|