Floating labels in Telerik winforms

1 Answer 181 Views
General Discussions GridView
Filembar
Top achievements
Rank 1
Iron
Iron
Filembar asked on 04 Mar 2022, 11:57 AM

Hi

I need floating labels in RadTextBox and RadDropDownList using telerik winforms.

Telerik has this feature implemented in their Floating Labels in kendo.react library for various controls.

However I'm using Telerik UI for Winforms R2 2020 which does not support this. In R2 2021 Telerik has added support only for floating labels Floating Labels in RadTextBox/RadTextBoxControl but not for RadDropDownList. I can't upgrade to R2 2021.

I need some customization tips to implement floating labels in both RadTextBox and RadDropDown using Telerik Winforms

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 04 Mar 2022, 12:07 PM

Hello,

Please have in mind that both RadTextBox and RadTextBoxControl have the embedded labels and you only need to set the ShowEmbeddedLabel property to “true”.  RadDropDownList internally uses a TextBox as well. I have prepared a sample code snippet demonstrating how to enable the embedded label for it. The attached gif file illustrates the achieved result:

            this.radDropDownList1.DropDownStyle = RadDropDownStyle.DropDown;
            this.radDropDownList1.DropDownListElement.TextBox.ShowEmbeddedLabel = true;
            this.radDropDownList1.DropDownListElement.TextBox.EmbeddedLabel.Text = "Enter data";

            for (int i = 0; i < 10; i++)
            {
                this.radDropDownList1.Items.Add("Item"+i);
            }
            this.radDropDownList1.SelectedItem = null;

It is very important to note that this functionality was introduced in R2 2021. Even though this feature seems to be simple, its implementation is not so easy to accomplish to give any general tips. However, you can have a look at the following KB article which demonstrates a sample approach:

https://docs.telerik.com/devtools/winforms/knowledge-base/floating-label 

Feel free to upgrade in order to benefit from the introduced improvement.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
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.

Tags
General Discussions GridView
Asked by
Filembar
Top achievements
Rank 1
Iron
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or