P
Phill W.
What's the "proper" way of handling this?
I have a base Control that offers a small set of options via its
ContextMenu.
I've now inherited from this and would like to add additional items to
this Context Menu structure but how best to do so?
Do I override the ContextMenu property in the sub-class, grab the value
of MyBase.ContextMenu and append to it?
Should use a separate function to do this "construction" and assign the
result to the ContextMenu property from Sub New?
(other options, please)
And then ...
What if I need to modify the existing items (defined in the base
Control)? Is there a "clean" way to support this, or do I just have to
search the whole menu structure to find a given item by name?
(Of course, by "MenuItem" I mean "ToolStripMenuItem"...)
TIA,
Phill W.
I have a base Control that offers a small set of options via its
ContextMenu.
I've now inherited from this and would like to add additional items to
this Context Menu structure but how best to do so?
Do I override the ContextMenu property in the sub-class, grab the value
of MyBase.ContextMenu and append to it?
Should use a separate function to do this "construction" and assign the
result to the ContextMenu property from Sub New?
(other options, please)
And then ...
What if I need to modify the existing items (defined in the base
Control)? Is there a "clean" way to support this, or do I just have to
search the whole menu structure to find a given item by name?
(Of course, by "MenuItem" I mean "ToolStripMenuItem"...)
TIA,
Phill W.