473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Question: Context Menu in Windows Form Label

I have a System.Windows.Forms.Label obj. How can I copy/paste the text in the label during run time. The TextBox obj has the context menu by default. Can I have the same for Label?

Thanks for the help,

Michael
Jul 9 '07 #1
3 1383
BTW, this question is for C#
Jul 9 '07 #2
Plater
7,872 Expert 4TB
You could try disguising a textbox as a label. I do that sometimes.
Change the colors and the borders so that it looks like a label. Then set the ReadOnly property and you can force users to use your context menu.

(Although if you want them to be able to enter in data anyway, why not just use a textbox anyway?)
Jul 9 '07 #3
Plater,

Thanks a lot. It worked for me.
Jul 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Norvin Laudon | last post by:
Hi, I have a context menu, which is used for each of 6 labels on my form. That is, right-clicking any of the labels will bring up the same context menu. Once the user clicks the menu, the...
8
by: Dennis C. Drumm | last post by:
Is there a way to modify the standard context menu shown when someone right clicks in a windows text box and that would work for all open windows applications? The standard context menu for...
0
by: Andrew Baker | last post by:
Have a look at the code below. It's a really simple example where I have added two controls to a form, a textbox and a combo box. Both add owner drawn context menus to the controls, but the...
1
by: Henry | last post by:
I was trying to work through the Lab 2 exercises in the Microsoft's Windows-Based Applications in Visual C#. While I am not showing any errors I am also not seeing the mainMenu object when I run...
1
by: Peter | last post by:
While I edit forms under VB.NET2003, One thing often puzzles me: When I right click a form and popup a contextmenu, the contextmenu usually contains: "View code","Bring to front","Send to...
1
by: goRide | last post by:
Hi, I'm looking of a way (preferred - a ready class or dll) to customize the context menu. many application has more controls inside the context menu (like textbox, sliders, checkbox, panel...
0
by: nave11 | last post by:
How to add Context menu to a class derived from System.Windows.Forms.Label ? This label will be dragged on a designer surface on runtime. For example, to add a context menu with "Copy" and "Paste"...
2
by: Bry | last post by:
I have a context menu which is shared between a TreeView and ListView control (both controls show the same information, similar to how Windows Explorer works, so it makes sense to use the same menu...
3
by: hzgt9b | last post by:
Using VS2005, VB.NET, I am developing a windows app that has a DataGridView. I want to enable the display of a context menu on this DataGridView only when a specific set of keys is also pressed...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.