Bar in menus

BlitzPlus Forums/BlitzPlus Beginners Area/Bar in menus

JBR(Posted 2007) [#1]
Hi, is it possible to use the little bar you sometimes get in menus to seperate entries?

Thanks
Jim


Adam Novagen(Posted 2007) [#2]
Easy. Just create a menu item with no text, like this:
Global menubreak = CreateMenu(parentmenu,"",number)
As a personal "rule of thumb," I assign menu "breaks" a value of zero, but you could really use any number. The beauty of this is that you can use the same global in multiple places, like this:
Global menubreak = CreateMenu(parentmenu1,"",number);create the first "menu break," and declare it as a global
;code
;code
;code
menubreak = CreateMenu(parentmenu2,"",number);now use the same variable for a different break!
That way, you save memory by using one variable for however many breaks you need in however many menus!


Senzak(Posted 2007) [#3]
I do the same thing with Labels a lot, just assign them all to the handle label