I have spent the last two hours searching the forums and on google
trying to resolve this simple issue.
All i am trying to do is set the alignment property of a label
which has been dynamically created.
Here is my code:
Dim MenuLabel As Control = New System.Windows.Forms.Label
Me.PB1.Controls.Add(MenuLabel)
with MenuLabel
.Name = "Some Name"
.Text = "Some Text"
.ForeColor = color.Blue
End With
Adding This does Not Work
.TextAlign = System.Drawing.ContentAlignment.MiddleRight
I get the error 'TextAlign' is not a member of 'System.Windows.Forms.Control'
trying to resolve this simple issue.
All i am trying to do is set the alignment property of a label
which has been dynamically created.
Here is my code:
Dim MenuLabel As Control = New System.Windows.Forms.Label
Me.PB1.Controls.Add(MenuLabel)
with MenuLabel
.Name = "Some Name"
.Text = "Some Text"
.ForeColor = color.Blue
End With
Adding This does Not Work
.TextAlign = System.Drawing.ContentAlignment.MiddleRight
I get the error 'TextAlign' is not a member of 'System.Windows.Forms.Control'