Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / May 2006

Tip: Looking for answers? Try searching our database.

Context menu strip

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
steffen_home_92@hotmail.com - 28 May 2006 12:15 GMT
hi ng,

I actually want to program an application whose main window contains a
menu strip and a tree view control. In the main menu there are items I
want to use for a context menu strip in the tree view but if I add a
menu item from the main menu strip to a context menu it disappears from

the main menu. Additionaly there's no (!) Clone-methode in the
ToolStripMenuItem class, so I can't just copy the menu item at runtime.

Can anybody help me?

Thanks,
Steffen
Kevin Spencer - 28 May 2006 15:24 GMT
A Control an only belong to the Controls Collection of 1 other Control. So,
if you add a Control to another Control's Controls Collection, it is
automatically removed from the Controls Collection it was previously in. The
Solution is, of course, to use 2 MenuItems, one for the Main Menu, and one
for the Context Menu Strip.

Signature

HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

This is, by definition, not that.

> hi ng,
>
[quoted text clipped - 10 lines]
> Thanks,
> Steffen
steffen_home_92@hotmail.com - 28 May 2006 21:14 GMT
Thank you, but there's really no other way than copying the whole menu
items using the VS2005 designer? Why doesn't ToolStripMenuItem have a
Clone() methode?

Steffen

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.