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

TextBox scaling with Microsoft Sans Serif font

4 Answers 22 Views
TextBox
This is a migrated thread and some comments may be shown as answers.
Frank Beerens
Top achievements
Rank 1
Frank Beerens asked on 14 Apr 2014, 12:05 PM
Hi,

When I use a telerik textbox, and set the font to Microsoft Sans Serif (size 11,25 pt) (see A in the attachment), some characters are not displayed fully. When I use Segoe UI it is rendered correctly (B in the attachment). Looks like the scaling of the component does not work 100%. Setting autosize to false does not work either: I am able to scale the control, but the 'inner textbox' stays too small.

Best Regards

4 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 16 Apr 2014, 06:40 AM
Hello Frank,

Thank you for writing.

Your question has already been answered in the other thread you have opened. Please, see our answer there for more information.

Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Frank Beerens
Top achievements
Rank 1
answered on 16 Apr 2014, 06:49 AM
Hello Desislava,

There is no relation between my two posts. This has noting to do with DPI scaling or whatsoever.

To reproduce this problem:
Create a winforms project, put two radtextboxes on a form, and set the font of one of them to Microsoft Sans Serif (size 11,25 pt).
When you type a character like 'g', the lower curve of the character is not painted correctly.

Regards
0
Frank Beerens
Top achievements
Rank 1
answered on 17 Apr 2014, 07:18 AM
It also happens when using a combobox. The lower parts of the characters dissapear when using Microsoft Sans Serif 11.25 pt.

Regards
0
Accepted
Ivan Todorov
Telerik team
answered on 18 Apr 2014, 01:24 PM
Hello Frank,

Following up on this case, it appears that this is a known issue which we already have in our feedback portal: http://feedback.telerik.com/Project/154/Feedback/Details/110711-fix-radtextbox-text-is-cut-from-below

As you can see in the description, the workaround is to set a MinimumSize to the inner text box. You can also see how to use TextMeasurer to measure the height of the text so that the text box sizes correctly with all fonts.
this.radTextBox1.TextBoxElement.TextBoxItem.HostedControl.MinimumSize = new Size(0, 20);
this.radDropDownList1.DropDownListElement.TextBox.TextBoxItem.HostedControl.MinimumSize = new Size(0, 20);

I hope you find this useful. Should you have any other questions, do not hesitate to write back.

Regards,
Ivan Todorov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TextBox
Asked by
Frank Beerens
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Frank Beerens
Top achievements
Rank 1
Ivan Todorov
Telerik team
Share this question
or