Hierarchical PopupMenu

Looking at various options for selecting hierarchical data in a new app.

Is it not possible to create a hierarchical menu system with the built-in PopupMenu control?

If not, looking for alternatives that can let me select from an infinitely long hierarchy (realistically only 5-10 layers deep)
• Build in listbox
• TreeView control form Einhugur
• Custom interface of some sort.

Thoughts on this?

[quote=100130:@Bob Keeney]Is it not possible to create a hierarchical menu system with the built-in PopupMenu control?

[/quote]

Faking it using the menuItem class in Mousedown of the popupmenu is one way…

But if it a really long hierarchical list, a listbox type solution would make more sense I think

Knowing how users like to abuse this stuff that’s probably the safest bet. Was hoping for the ‘simple’ solution but I guess that would have been to easy/simple.

[quote=100130:@Bob Keeney]Looking at various options for selecting hierarchical data in a new app.

Is it not possible to create a hierarchical menu system with the built-in PopupMenu control?

If not, looking for alternatives that can let me select from an infinitely long hierarchy (realistically only 5-10 layers deep)
• Build in listbox
• TreeView control form Einhugur
• Custom interface of some sort.

Thoughts on this?[/quote]

Use a ContextualMenu. It is hierarchical and can be attached to any control with MouseDown :

[code]Sub Action()
dim hitItem as MenuItem
dim base as new menuitem
// Add some items
base.Append( New MenuItem( “Test 1” ) )
base.Append( New MenuItem( “Test 2” ) )
base.Append( New MenuItem( “Test 3” ) )

// Add a Separator
base.Append( New MenuItem( MenuItem.TextSeparator ) )

// Add a sub menu
Dim submenu As New MenuItem( “SubMenu” )
submenu.Append( New MenuItem( “SubMenu Test 1” ) )
submenu.Append( New MenuItem( “SubMenu Test 2” ) )
submenu.Append( New MenuItem( “SubMenu Test 3” ) )
base.Append( submenu )

// Add a Separator
base.Append( New MenuItem( MenuItem.TextSeparator ) )
hitItem = base.PopUp
End Sub
[/code]

At first blush it seems like the way to go but I’m not convinced that a hierarchical menu is efficient enough for my purpose. There could potentially be hundreds of items, sub items, sub-sub items and so on and menu’s aren’t very efficient with those numbers.

I agree. If you are talking about hundreds of items, the regular menus are not up to the task. I would go to listboxes instead. Let alone to be able to scroll, because you will probably not have enough real estate on the screen.

Windows XP did that with its start menu. Each new hierarchy appeared as a new box on the right next to the previous one.

The Apple folder panel view is interesting too in that respect. It could be emulated with a series of listboxes fairly easily, and it supports well large quantities of items.