dalmond Posted October 25, 2005 Posted October 25, 2005 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 Quote
Diesel Posted October 25, 2005 Posted October 25, 2005 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; } } } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.