Completed
Last Updated: 11 Oct 2023 10:09 by ADMIN
Release R3 2023
n/a
Created on: 11 Aug 2021 06:02
Category: TextBox
Type: Bug Report
1
RadTextBox: when ShowEmbeddedLabel property is enabled the controls does not receive focus in the Shown event
RadTextBox doesn't get focused if the embedded label is shown. However, if the embedded label is not shown, RadTextBox is focused as expected. 
        public RadForm1()
        {
            InitializeComponent();
            this.radTextBox1.ShowEmbeddedLabel = true;
            this.radTextBox1.EmbeddedLabelText = "Enter name:";
        } 

        private void RadForm1_Shown(object sender, EventArgs e)
        {
             this.radTextBox1.Focus();
        }
1 comment
ADMIN
Dinko | Tech Support Engineer
Posted on: 03 Jul 2023 08:04

Hi Keven,

A possible workaround for this behavior is to focus the control first and then enable the embedded label. 

public Form1()
{
    InitializeComponent();
    this.radTextBox1.ShowEmbeddedLabel = false;
    this.radTextBox1.EmbeddedLabelText = "Embedded Label Text";
    this.Shown += Form1_Shown;
}

private void Form1_Shown(object sender, EventArgs e)
{
    this.radTextBox1.Focus();
    this.radTextBox1.ShowEmbeddedLabel = true;
}

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.