Menu Items in 2 Columns with Prop:Max=1

I just noticed at the bottom of the help on MENUBAR its possible to force 2 columns of ITEMs. That’s not mentioned in ITEM or MENU or PROP:Max.

A two-column drop menu can be achieved by assigning PROP:Max = 1 to the ITEM which should begin the second column.

Works with Extended UI Themed also

image

You can have more than 1 split:

image

I tried [ PROP:Max ] syntax on a POPUP but it did not work. Anyone know how to force a V Split in a Popup?

'|[' & PROP:Max &'(1)]' & 'Long Item Bee 01' & |

3 Likes

What would it look like if PROP:Max = 0 ?

It would be a single column of 24 menu items

Here’s an actual long menu where I did this originally calling API SetMenuItemInfo() to change Type to MF_MENUBARBREAK which is a lot more work than Prop:Max

  ?Font_ID_FONTS{PROP:Max}=1
  ?Para_ID_PARA_STYLE{PROP:Max}=1

Without the Max=1. I would have put a Horizontal Separator at the column break above Fonts… and Style…

I like that ! Thanks Carl.

IIRC POPUP will automatically convert to multiple columns when there are too many rows to fit on the screen

Yes it splits to fit, or maybe it auto scrolls.

My desire is to spilt at a logical place, like all the basic font styling (bold italic…) are split to the left, the more complex font items are on the right.

The alternative is it use sub menus which can hide things and take more mouse travel, but if that subset of items belongs together it is a good solution. It depends on the application what’s best, and opinion. Now I know how to split.

For me, sub menus take an extra amount of mouse travel because I usually have to open the menu 500 times, give or take 100, to get the correct thing to appear.

Are you talking about taking many code/test cycles writing the code using the Popup Class, especially with Submenu{{Items|xxxx|yyyy}|zzz

No, I was speaking about using them and trying to not miss the menu with my mouse, because otherwise I have to start over I don’t remember it being a problem to use the PopupClass for submenus, but it’s been a few years since I’ve needed that.
In general, I think the PopupClass is pretty useful, and easy to add to handcoded projects.