complex properties (font) on composite controls

G

Gentian Hila

I have a control that is used to get a date (dropdown calendar) and is made
up by a label and three dropdownlists. I overrided the Enabled property so
when it is true/false all of the child controls are Enabled/Disabled.
That was easy. But now I need to change the text size of the composite
control.When I do that, only the text size of the label changes.
If the size would be a property of the WebControls that would be easy. Just
override it and that's it. But size is a subproperty of Font.
How can I make it work ? Any help is appreciated

Thank you
 
S

Sergey Poberezovskiy

I have not tried myself, but why not create a Font property and pass it onto
your controls? Or create a TextSize property and update the Font of your
internal controls in that...
 
K

Ken Baltrinic

If you control is inheriting from WebControl, look at the documentation for
the CopyBaseAttributes() method. This method can be used to copy all the
standard display attributes from your control to its member controls.
--Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top