Embedded Label position in TextBox

1 Answer 191 Views
TextBox TextBoxControl
Dave
Top achievements
Rank 2
Iron
Iron
Veteran
Dave asked on 27 Jul 2021, 08:06 PM

I have a form with two TextBox controls with ShowEmbeddedLabel and RepositionEmbeddedLabel enabled. The TextBox font size is 18P and the Embedded Label sizes are 18P and 10P. 

When running, the first textbox with the larger EL looks and works fine.  The textbox with the 10P EL, not so much.  The EL rests in the center of the control, rather than the bottom.  What property have I overlooked to have the 10P EL  align to the bottom of the control rather than hover in the center?

I've tried disabling TextBoxElement.AutoSize and setting its Size, but that really confuses the renderer. Messing the the LightVisualElements, didn't help either. Resizing the control almost works, but the descenders, the 'tails', of letters are clipped then the EL is bottom aligned.

 

Thanks!
        public RadForm1()
        {
            InitializeComponent();

            radTextBox1 = new Telerik.WinControls.UI.RadTextBox();
            radTextBox1.Font = new System.Drawing.Font("Segoe UI", 18F);
            radTextBox1.Location = new System.Drawing.Point(10, 10);
            radTextBox1.Size = new System.Drawing.Size(300, 80);
            radTextBox1.EmbeddedLabelText = "RTB1: 18F x 18F";
            radTextBox1.ShowEmbeddedLabel = true;
            this.Controls.Add(this.radTextBox1);
            radTextBox1.TextBoxElement.Font = new System.Drawing.Font("Segoe UI", 18F);
 


            radTextBox2 = new Telerik.WinControls.UI.RadTextBox();
            radTextBox2.Font = new System.Drawing.Font("Segoe UI", 18F);
            radTextBox2.Location = new System.Drawing.Point(10, 90);
            radTextBox2.Size = new System.Drawing.Size(300, 80);
            radTextBox2.EmbeddedLabelText = "RTB2: 18F x 10F";
            radTextBox2.ShowEmbeddedLabel = true;
            this.Controls.Add(this.radTextBox2);
            radTextBox2.TextBoxElement.Font = new System.Drawing.Font("Segoe UI", 10F);
        }

1 Answer, 1 is accepted

Sort by
0
Stoyan
Telerik team
answered on 28 Jul 2021, 01:55 PM

Hello David,

After investigating the issue at hand, I saw that we have a small bug with positioning the embedded label. 

I have opened a new public feedback item on your behalf. Here is a link to it, where you can subscribe to the item and vote for it. I have also updated your Telerik Points.

For the time being, I cannot offer an alternative solution, but we are planning to introduce a fix with our upcoming internal build.

If there is anything else, I can help you with, do not hesitate to write back.

Regards,
Stoyan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
TextBox TextBoxControl
Asked by
Dave
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Stoyan
Telerik team
Share this question
or