applying a font to all textboxes in the application

ethicalhacker

Well-known member
Joined
Apr 22, 2007
Messages
142
Location
Delhi,India
Programming Experience
5-10
I have around 80 textboxes labels etc in my application I want that if I change the font it gets applied to all the textboxes in the application.
And I DONT want to keep on specifying all the 80 textboxes for the font to be applied
 
I have moved the thread to better suited Windows Forms forum.

Change the font of the controls container and it will propagate to the child controls. For example if these textboxes is in the forms Controls collection you set the Font property of form. It only works if the child controls (the textboxes) have default font, if you have set a specific font in designer so the property values is bolded they will not be affected by the cascading rule. This is also the reason that the form and for instance a Panel container control has Font property even though they don't display any text by themself.
 
Back
Top