Font Size

dalmond

Newcomer
Joined
Oct 14, 2003
Messages
11
Location
Montgomery, AL
I am trying to create a usercontrol that has five labels on it and I want to restrict the font size to no less then 8.25 and no greater then 10. Does anyone know how this can be done?

Thanks,

dalmond
 
Are the labels public? Barring any cool design trick, the easiest way would be to expose the font of the control as a property and impose constraints there.

Will each label have a unique font? All the same?

public Font HeaderFont
{
get
{
return this.headerFont;
}
set
{
if (value.Size >= 8.25 && value.Size <= 10)
{
this.headerFont = value;
}
}
}
 
Back
Top