Multi-column menus

Multi-column menus

The new Break and BarBreak properties of the MenuItem object let you create menus with multiple columns. All you have to do is set either property to True for the MenuItem object that must become the first item of a new menu column. The only difference between these two properties is that BarBreak displays a vertical line among adjacent columns, whereas Break does not.

A minor annoyance attached to these properties is that they don’t appear in the Properties window, so you have to set them via code, as you see here:

mnuFileItem6.BarBreak = True

You can place this statement in the InitializeComponent procedure (the one generated by the form designer), at the end of the New method, or in the Form_Load event procedure. Using the latter two locations ensure that your code isn’t overwritten by the form designer when you change another property of the same MenuItem object.

See also  Small Business Strategies with Venmo

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist