Stuart,
you can simply creates a new class called... let say - "MyMenuItem" that
inherites "MenuItem" and adds a single object member called "Tag" or even
more members and properties as you like.
code (C#)
using System;
using System.Windows.Forms;
namespace Stuart
public class MyMenuItem : MenuItem
{
private object _tag;
public MyMenuItem() : base()
{
}
public object Tag
{
get
{
return _tag;
}
set
{
_tag = value;
}
}
}
}
Picho
"Stuart Ferguson" <st**************@btinternet.com> wrote in message
news:cc**********@sparta.btinternet.com...
Hi All,
I am currently writing an application in C# that uses dynamic menus that
are created from a Database table. The problem I have is that i need a
property in the MenuItem to store the DB Key value when I create the Item (similair
to the Tag property, which is not there). Is there a way of adding the
Tag property to the MenuItem Class, if not is there any property that can
store this data ?
Best Wishes
Stuart Ferguson