Pretty instulting, I know how to create a menu element, a button or a
combobox on a menustrip, thank you.
My concern is about sub-menus. As I said, I'm new to C# programming and
I'm sure I'm just missing a very simple and obvious concept that will
allow me to go-on by myself. If I google it or search MSDN, I don't get
any information relative to my question since everything is so focused
on menustrip new features.
Let me put it that way:
MenuStrip MS1 = new MenuStrip();
ToolStripMenuItem MITest = new ToolStripMenuItem("File");
MS1.Items.Add(MITest);
Now, how do I add items to MITest since I don't have an Items property
or a Add method... That's what I don't get. I'm sure I just have the
wrong object type but which one to use?
I would like to create a menu of type:
Edit->
->Copy
->Paste
->Paste Special->
->->Paste as new layer
->->Paste as new image
->Cut
etc.
Thanks,
Justin
Forrest a écrit :
Uzytkownik "tonFrere" <ju**********@gmail.comnapisal w wiadomosci
news:11**********************@45g2000cws.googlegro ups.com...
Hello,
I'm new to C# programming and would like to create a menu strip at
form-load, based on the results of a SQL query. The function would
create a menu depending on user rights. Do you have any article where I
can learn about Menustip hierarchy, MenuStrip, ToolStrip,
ToolStripItem, How do I create sub, sub-sub, sub-sub-sub-menus etc. Or
is there an easier way to do this?
Thanks!
Justin
Sorry, but do you know what's google or MSDN?
ToolStrip str = new ToolStrip();
str.Items.Add(new ToolStripButton("button"));
str.Items.Add(new ToolStripComboBox("combo"));
simple?
Forrest