Make RadLabel Text Selectable For Copy and Paste

2 posts, 0 answers
  1. Edmund
    Edmund avatar
    9 posts
    Member since:
    Oct 2014

    Posted 10 Nov 2014 Link to this post

    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
  2. Dess
    Admin
    Dess avatar
    1607 posts

    Posted 13 Nov 2014 Link to this post

    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.

     
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top