Management DomainUpDown (spinner) disables the lower pixel of the displayed text

I use winforms, and the DomainUpDown control height is locked at 20 pixels, which results in "y" and other characters with crop edges at the bottom.

My initial thought on how to fix the problem was to change the height of the controls, but I could not do it. In the designer, I only have controls to drag it in width. The property page immediately returns any height change I make. Attempts to change the value in the code are silent; no error, no exception, but the value does not change.

In this example, the form "g" in DomainUpDown will be cut.

public partial class Form1: System.Windows.Forms.Form
{
    private System.Windows.Forms.DomainUpDown domainUpDown1 = new System.Windows.Forms.DomainUpDown ();
    public Form1 ()
    {
        this.domainUpDown1.Location = new System.Drawing.Point (16, 8);
        this.domainUpDown1.Size = new System.Drawing.Size (212, 20);
        this.domainUpDown1.Text = "why are descenders like g cut?";
        this.ClientSize = new System.Drawing.Size (328, 64);
        this.Controls.Add (this.domainUpDown1);
    }
}
+3
source share
1 answer

DomainUpDown. , . , "descenders". , 8.25pt .

EDIT: XP, , , g.

BorderStyle FixedSingle None .

domainUpDown1.BorderStyle = BorderStyle.FixedSingle;

domainUpDown1.BorderStyle = BorderStyle.None;

, . , XP ( ) .

+1

Source: https://habr.com/ru/post/1714810/


All Articles