We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Base Font Size

hi, I''m evaluating the HTML control. I need to add a couple of buttons to increase/decrease the overall text size, in the way IE can do. How can I do this? Gary

2 Replies

AD Administrator Syncfusion Team August 12, 2005 02:26 PM

Hi Gary, I am try to create a sample that changes the font size like the feature in IE. I am running into some issues and I have submitted the issue to the developers and I will get back to you as soon as I hear from them. Thank you for your patience. Regards, Davis


NR Nandakumar R Syncfusion Team February 7, 2006 10:26 AM

Hi Gary, The HTMLUI control allows the user to access the default format used for rendering the html document. The DefaultFormat.Font property helps the user in getting or setting the base font and its size while rendering the document in the HTMLUI control. The font size can be changed by changing the DefaultFormat.Font property of the HTMLUI control. [C#] //Increasing the font size at run time by clicking a button FontIncButton.Click += new System.EventHandler(FontIncButton_Click); private void FontIncButton_Click(object sender, System.EventArgs e) { //Increasing the DefaultFormat font size float fontSize = 15; //Applying the changed size to the default format htmluiControl.DefaultFormat.Font = new Font(htmluiControl.DefaultFormat.Font.FontFamily, fontSize); } The sample attached below shows how the font size can be changed as like in IE. Hope this helps you. Thank you for your interest in Syncfusion products. Regards, Nanda. 33063_FontSizeChange.zip

Loader.
Live Chat Icon For mobile
Up arrow icon