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

realfontsize and width of ddl

3 Answers 28 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Mattias
Top achievements
Rank 1
Mattias asked on 24 Nov 2008, 09:07 AM
Hi,

I have 2 problems:
1. Setting realfontsize codebehind not working, I just get pixels from 8-72 when viewing the page.
2. The Width property of EditorTool is not valid codebehind, but works when setting in designmode.


RadEditor newEditor = new RadEditor(); 
            newEditor.Skin = "Gray"
            newEditor.EnableEmbeddedSkins = false
            newEditor.EnableEmbeddedBaseStylesheet = false
            newEditor.Tools.AddRange(getTools()); 
            newEditor.RealFontSizes.Add(new EditorRealFontSize("1.7em")); 
            newEditor.RealFontSizes.Add(new EditorRealFontSize("1.5em")); 
            newEditor.RealFontSizes.Add(new EditorRealFontSize("1.3em")); 
            newEditor.RealFontSizes.Add(new EditorRealFontSize("1.1em")); 
            newEditor.RealFontSizes.Add(new EditorRealFontSize("1.0em")); 
            newEditor.RealFontSizes.Add(new EditorRealFontSize("0.9em")); 
            newEditor.RealFontSizes.Add(new EditorRealFontSize("0.8em")); 
 
... 
 
 
        private IEnumerable<EditorToolGroup> getTools() 
        { 
            IList<EditorToolGroup> toolGroups = new List<EditorToolGroup>(); 
            EditorToolGroup toolGroup = new EditorToolGroup(); 
            EditorTool groupItem; 
 
            groupItem = new EditorTool(); 
            groupItem.Name = "RealFontSize"
            groupItem.Text="Storlek"
            //groupItem.Width = "60px"; 
            toolGroup.Tools.Add(groupItem); 
 
            ... 
 
            toolGroups.Add(toolGroup); 
 
            return toolGroups.AsEnumerable(); 
        } 

3 Answers, 1 is accepted

Sort by
0
Mattias
Top achievements
Rank 1
answered on 24 Nov 2008, 09:10 AM
I just find out that realfontsize IS working codebehind! My fault!
But I still have problems with the width property.

/Mattias
0
Accepted
Rumen
Telerik team
answered on 24 Nov 2008, 01:11 PM
Hi Mattias,

Here is how to set the dropdown width on the server:

groupItem.Attributes["Width"] = "100px";


Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mattias
Top achievements
Rank 1
answered on 24 Nov 2008, 01:54 PM
Thanx Rumen!
Tags
Editor
Asked by
Mattias
Top achievements
Rank 1
Answers by
Mattias
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or