M
Miro
Is there a way to / or a mathematical formula to see if a font size is 'too
big' for a label.
I have a label that is docked to 'fill' a form, and I want to resize that
font based on the width and height of the label.
So far I have something like this on the Form_Resize event:
Label2.Font = New Font(Label2.Font.Name, _
Label2.Size.Height - 100, Label2.Font.Style)
but it only works to a point, once the height gets past a certain point, the
font is simply too big for the label.
I know I can add some math for a maximum font size compared to the height
and width of the label, but im wondering if there is another simpler way of
a mathematical formula to do this in one shot.
Thanks,
miro
big' for a label.
I have a label that is docked to 'fill' a form, and I want to resize that
font based on the width and height of the label.
So far I have something like this on the Form_Resize event:
Label2.Font = New Font(Label2.Font.Name, _
Label2.Size.Height - 100, Label2.Font.Style)
but it only works to a point, once the height gets past a certain point, the
font is simply too big for the label.
I know I can add some math for a maximum font size compared to the height
and width of the label, but im wondering if there is another simpler way of
a mathematical formula to do this in one shot.
Thanks,
miro