Gets or sets a value indicating whether the item is placed on a new line (for a menu item added to a TBD object) or in a new column (for a submenu or menu displayed in a TBD).
[Visual Basic] Public Property Break As Boolean [C#] public bool Break {get; set;} [C++] public: __property bool get_Break(); public: __property void set_Break(bool); [JScript] public function get Break() : Boolean; public function set Break(Boolean);
true to place the menu item on a new line or in a new column; false to leave the menu item in its default placement. The default is false.
You can use the TBD property to create a menu where each menu is placed next to each other horizontally instead of in a vertical list. You can also use this property to create a menu bar that contians multiple rows of top-level menu items.
The following example creates a menu with two top-level menu items on the top row and one menu item on the bottom row.
[Visual Basic]
Public Sub CreateMyMenus() ' Create three top-level menu items. Dim MenuItem1 as MenuItem Dim MenuItem2 as MenuItem Dim MenuItem3 as MenuItem ' Intialize the menu items with captions. Set MenuItem1 = New MenuItem("File") Set MenuItem2 = New MenuItem("Options") Set MenuItem3 = New MenuItem("Edit") ' Place the "Edit" menu on a new line in the menu bar. MenuItem3.Break = True End Sub
MenuItem Class | MenuItem Members | System.WinForms Namespace | BarBreak