473,387 Members | 1,760 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,387 software developers and data experts.

Create a ContextMenu

I have a two part question.

I would like to provide a run-time feature that would duplicate the
design-time capability to create a Context Menu. This would be where the
user could create their own ContextMenus. I would like to save this Menu
structure as either XML or a text file using C#.

The iterface for creating menus (either Main Menu/ or Context Menu) is very
simple, but trying to understand how to add different levels (either
drop-downs or fly-outs) is confusing especially as the nesting goes deeper
down.

Question #1. Is there a way to extend the Menu creation capabilites in the
IDE using C# and persist the structure and labels to programmatically
save/load different context menus from and end-users pespective. (For
example the user wants to create a number of context menus, and select the
different context menus for a control from a listbox)

Question #2. How else could one create this functionality in C#?

TIA,

Fritz
Nov 17 '05 #1
1 2321
Fritz,
Question #1. Is there a way to extend the Menu creation capabilites in the IDE using C# and persist the structure and labels to
programmatically save/load different context menus from and end-users pespective. (For
nope. you need to build that functionality yourself.
Question #2. How else could one create this functionality in C#?


well basically, all you need is some kind of file where you store the content
of the menus. xml certainly maps quite good for this purpose. during
runtime, you simple read that file and create the menus....

hm... i'm not sure this is an answer - maybe i didn't understand the
question :-)

WM_HOPETHISHELPS
thomas woelfer
http://www.die.de/blog
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brian Martel | last post by:
I am trying to create a dynamic flyout submenu off of a contextmenu. I can right click and get the base contextmenu ok. On the Popup event I add MenuItem's to the collection of one of the items so...
0
by: pei_world | last post by:
Hi, the problem describes as below: 1st question //============== code =================== //= in Parent Form, I create following function: void newForm(Form parent,Form theForm){ foreach(Form...
1
by: Valerie Hough | last post by:
Is there any reason why a ContextMenu object cannot be created (and populated with menu items) in the constructor of the control for which it will be used? If not, then why don't my mnemonics...
0
by: Daniel K. | last post by:
I've got a form with a usercontrol and a contextmenu for it. I put everything together in the VS form designer. the codesnipped below is from that dialog. The problem: Before i added the...
2
by: Derrick | last post by:
I've been working on an application which has a NotifyIcon (system tray icon), and a corresponding ContextMenu. I want to be able to update this menu dynamically. However, when I make changes to...
5
by: Jorge Cavalheiro | last post by:
Hello I am trying to browse thru all menuitens of contextmenus. The form has 3 contextmenus. mi and mi2 as menuitems, f is a form For Each mi In f.ContextMenu.MenuItems For Each mi2 In...
11
by: Graham Charles | last post by:
I'm writing a control inheriting from ComboBox, and I'd like to add an entry to the ContextMenu for that combo box. I have no problem if I create an entirely new ContextMenu from scratch, but I'd...
3
by: Libby Sharf | last post by:
Hello, I have several ContextMenus and I want to connect them to the GridControl's ContextMenu property depending on the row that was right clicked. Is there an event that is raised just before...
1
slapshock
by: slapshock | last post by:
Good day, please help me on my problem.... i want to create a context menu strip on run time but i got this error, please help me, i tried to search on the net but i cant fine any solution...
3
by: asharda | last post by:
Hi, I am trying to create a context menu in my application. The context menu takes menu otems from an XML file. In XAML the code is <Grid.ContextMenu> <ContextMenu Name="cm" StaysOpen="true"...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.