Form Decorator not working on some form elements

5 posts, 0 answers
  1. Robert
    Robert avatar
    58 posts
    Member since:
    Dec 2008

    Posted 09 Apr 2009 Link to this post

    Hello,

    I'm working with Form Decorator.  The button, check boxes, and radio buttons work and I can see the skins applied to them but the decorator is not "decorating" the other elements.  I have the DecoratedControls set to "All" but I'm stil only seeing the skin applied to the default items.

    Do I need to add the "All" somewhere else as well?

    Thank you,
    Bob
  2. Robert
    Robert avatar
    58 posts
    Member since:
    Dec 2008

    Posted 09 Apr 2009 Link to this post

    Hello,

    I think I figured it out.

    I looked into the CSS and found that the font family is not declared in either the global or the form decorator CSS files.  I didn't notice before but once I changed to a different skin I realized that the background and rounded corners on the fieldset (and other elements) were actually being affected by the skin and only the font family (font face) that was defaulting to Times.

    Is it set up this way so the labels, legends, and headings (4,5 and 6) take on the font-family from a non-Telerik style sheet?  That would make sense I suppose and would keep from having to edit font-family in more than one style sheet.  What threw me was that the button font is declared in the global form decorator style sheet and I assumed the others would be as well.

    Bob
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 13 Apr 2009 Link to this post

    Hello Robert,

    Your observation is correct - labels, legends, and headings (4,5 and 6) are styled with fore-color (and with a bottom border on some occasions), but the FormDecorator does not set a font-family for those on purpose.

    There are a number of reasons for this:
    - Developers can use their own font-family suitable for the particular page/application
    - Different fonts have different default sizes for Headings, labels and legends. Since decoration occurs on the client, if a font family was specified by the RadFormDecorator itself and it was (obviously) different than the default, the result would be a visible and unpleasant flicker when the height of the styled elements was changed (as a sequence from the font family change). To be more exact, consider that the default is Times New, and the decorator makes it Arial. The Arial font is larger and the element would assume larger height even if its (default) font-size is not changed.

    I hope this information helps.

    All the best,
    Tervel
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  5. Robert
    Robert avatar
    58 posts
    Member since:
    Dec 2008

    Posted 16 Apr 2009 Link to this post

    Hi Tervel,

    Yes, Thank you.

    One other question about the headings.  I'm looking at the CSS for the Form Decorator (FormDecorator.WebBlue.css) and I see the following for an h5:

    .RadForm_Metastorm h5.rfdH5
    {
    color: #000000;
    border-bottom: solid 1px #a0a0a0;
    }
     
    The underline is there as you mention in your previous post as is the color.  But, how is this used in the markup?  The only way I can get it to show up like this is to apply the specific class (rfdH5) to the H5 tag as such <h5 class="rfdH5">.  Is this the correct way or am I missing something?  Perhaps this class is only to be manually implemented so as not to intefere with a previously defined H5?

    Thanks,
    Bob
  6. Robert
    Robert avatar
    58 posts
    Member since:
    Dec 2008

    Posted 16 Apr 2009 Link to this post

    Oh Wait, I needed to set the DecoratedControls="all".  I've been bouncing back and fourth betwen a custom skin and a default skin and didn't set that to all.  Now I see the headings with the underlines.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017