This is a migrated thread and some comments may be shown as answers.

Form Decorator not working on some form elements

4 Answers 72 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 09 Apr 2009, 07:16 PM
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

4 Answers, 1 is accepted

Sort by
0
Robert
Top achievements
Rank 1
answered on 09 Apr 2009, 07:31 PM
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
0
Tervel
Telerik team
answered on 13 Apr 2009, 06:58 AM
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.
0
Robert
Top achievements
Rank 1
answered on 16 Apr 2009, 11:29 AM
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
0
Robert
Top achievements
Rank 1
answered on 16 Apr 2009, 03:03 PM
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.
Tags
General Discussions
Asked by
Robert
Top achievements
Rank 1
Answers by
Robert
Top achievements
Rank 1
Tervel
Telerik team
Share this question
or