Child menus, how would I do this

  • Thread starter Thread starter M
  • Start date Start date
M

M

Hopefully this will come out right but this is what I'd like

Shapes
=======
Squares
|___by color
|___Red
|___Yellow
|___by size
|__Large
|__Medium
|__Small
Circles
Triangles



Is there a way to have the sub menus attached to Circles and Triangles
without manually adding each one in the code? Yes that would be merging
right? ok now how can I determine who called Large Yellow or Small Red, do
I have to do something like sender->parent->parent->text ?

Thanks
 
M said:
Hopefully this will come out right but this is what I'd like

Shapes
=======
Squares
|___by color
|___Red
|___Yellow
|___by size
|__Large
|__Medium
|__Small
Circles
Triangles



Is there a way to have the sub menus attached to Circles and Triangles
without manually adding each one in the code? Yes that would be merging
right? ok now how can I determine who called Large Yellow or Small Red, do
I have to do something like sender->parent->parent->text ?

Thanks
Question. Are you working in Visual Studio .NET? If not, what tool(s) are
you using?
Observation: If you pursue the menu strategy you've illustrated, you're
going to create a lot of redundancy. Why not have menu selections (at the
top) for Shapes, Colors and Sizes? That way the color and size settings are
presented only once and can be selected for any shape.
 
Peter van der Goes said:
Question. Are you working in Visual Studio .NET? If not, what tool(s) are
you using?
Observation: If you pursue the menu strategy you've illustrated, you're
going to create a lot of redundancy. Why not have menu selections (at the
top) for Shapes, Colors and Sizes? That way the color and size settings are
presented only once and can be selected for any shape.

Thanks for replying.

I am working in VS .NET, an older version using 1.0 framework.

Redundancy is what I'm trying to avoid. Meaning I don't want to have to
create separate menuitems (and handlers) for CircleRedLarge_OnClick,
CircleRedSmall_OnClick, etc. I was hoping to have one function to handle
everything and point all the eventhandlers to it. That function would then
be able to determine who called it and act accordingly.
Why not have menu selections (at the
top) for Shapes, Colors and Sizes? That way the color and size settings are
presented only once and can be selected for any shape.

Do you mean like a check box menu where the user selects a shape then moves
to the colors menu and selects a color and then moves to the size menu.?

I suppose I could do that but this is a context menu and I would it to be
accessible by right clicking anywhere in the screen

Thanks again
 
Back
Top