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

Make RadLabel Text Selectable For Copy and Paste

1 Answer 511 Views
Label
This is a migrated thread and some comments may be shown as answers.
Edmund
Top achievements
Rank 1
Edmund asked on 10 Nov 2014, 03:58 PM
I'm displaying some information in a panel using the RadLabel.  I noticed that you cannot select (i.e., drag and highlight) the RadLabel Text.  Is there a setting so that the label can be highlighted for copy and paste purposes by the user?

Thank you!

Best Regards,

Ed

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 13 Nov 2014, 02:37 PM
Hello Edmund,

Thank you for writing.

RadLabel is a themeable alternative to the standard Windows Forms label control. Hence, it does not support text selection and copy/paste functionality. It is designed just to display text. However, I would suggest you use a RadTextBox and customize it to look like a selectable label. Here is a sample code snippet:
this.radTextBox1.Text = "Hello, Select Me";
this.radTextBox1.ReadOnly = true;
this.radTextBox1.TextBoxElement.ShowBorder = false;
this.radTextBox1.TextBoxElement.Fill.BackColor = this.BackColor;       
this.radTextBox1.BackColor = this.BackColor;
this.radTextBox1.TextBoxElement.TextBoxItem.BackColor = this.BackColor;
this.radTextBox1.TabStop = false;

Let me know how this works for you.
 
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.

 
Tags
Label
Asked by
Edmund
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or