complex properties (font) on composite controls

Discussion in 'ASP .Net Building Controls' started by Gentian Hila, Jan 5, 2006.

  1. Gentian Hila

    Gentian Hila Guest

    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
    Gentian Hila, Jan 5, 2006
    1. Advertisements

  2. 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...
    Sergey Poberezovskiy, Jan 9, 2006
    1. Advertisements

  3. 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 Baltrinic, Jan 19, 2006
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.