teamjager
asked on
C# Is it possible to make the text in a label selectable to the clipboard?
Is it possible to select the text with a mouse within a label and then right click and copy it to a clipboard? I read somewhere else ( Granted this was VB .NET and not C#) that you set Locked = true and Style = Flat and that would allow you to do it. Since the C# label does not have a direct Style property i tired this with the flatstyle property instead. Thanks for the help folks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
...with ReadOnly to True (using the TextBox)
You can easily change a TextBox for this purpose.
TextBox1.Text = "Hello, Select Me";
TextBox1.ReadOnly = true;
TextBox1.BorderStyle = 0;
TextBox1.BackColor = this.BackColor;
TextBox1.TabStop = false;
have a look at the url http://i.stack.imgur.com/1M4wH.png
TextBox1.Text = "Hello, Select Me";
TextBox1.ReadOnly = true;
TextBox1.BorderStyle = 0;
TextBox1.BackColor = this.BackColor;
TextBox1.TabStop = false;
have a look at the url http://i.stack.imgur.com/1M4wH.png
wil