Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
293
Change font size dropdown to resemble ms word font size
posted

Hi,

 

I want to change font size dropdown from values 1 to 7 to similar that of word like 8,8.5,9,11,13 etc.

Any help is appreciated.

Regards

Mac 

 

Parents
  • 28464
    posted

    The font size dropdown can be manipulated through the API, for example: 

     protected void Page_PreRender(object sender, EventArgs e)
    {
        // Find the FontSize drop down item in the Toolbar.Items collection.
        ToolbarDropDown dropDown = (ToolbarDropDown)  this.WebHtmlEditor1.Toolbar.Items.GetByType(ToolbarItemType.FontSize);

        // Clear items coming from the FontSizeList property.
        dropDown.Items.Clear();
        // Add items that preview the font size their selection sets.
        dropDown.Items.Add(new ToolbarDropDownItem("<font size='1'>xx-small</font>", "1"));
        dropDown.Items.Add(new ToolbarDropDownItem("<font size='2'>small</font>", "2"));
        dropDown.Items.Add(new ToolbarDropDownItem("<font size='3'>medium</font>", "3"));
        dropDown.Items.Add(new ToolbarDropDownItem("<font size='4'>large</font>", "4"));
        dropDown.Items.Add(new ToolbarDropDownItem("<font size='5'>x-large</font>", "5"));
        dropDown.Items.Add(new ToolbarDropDownItem("<font size='6'>xx-large</font>", "6"));
    }

    More info is available in our online help available here:

    http://help.infragistics.com/NetAdvantage/NET/2008.2/CLR3.5

     

Reply Children