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
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
This code doesnt work for me. I am able to add items to dropdown form xx-small to xx-large but unable to remove the default items from 1 to 7. I have a sample project than i can send if i am provided the email id.
I tried following events
1) Page Prerender
2) Page Prerender complete
3) Toolbardropdown pre render
4) Webhtmleditor pre render
5) Webhtmleditor load event. I tried loading dropdown dynamically with fontsize and type and still get the same result.
5) Toolbardropdown ondatabinding
Am i missing any settings to be one to avoid filling default values?
Items.Clear() from above code doesnt work since Items.Count in 0 in each event.
Do you know which event fills dropdownlist?
I don't know whether you could solve the problem, but try doing this,
FontSizeList=""
otherwise you can set FontSizeList from the property window to blank string from the quick design as well.
Let me know whether that helped you or not?
Regards,
Dhananjay Kathar