Home Forums WinForms controls Other WinForms controls Displaying Seperators in a PopupMenu

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17984 |

    I’m using the example code in that’s found in the SmartUI for .NET FAQ:

    http://www.xceedsoft.com/support/FAQ.asp?Pid=289&Gen=0#id429

    And it works fine. However, I’d like to add a seperator to the menu’s, and haven’t had any luck. Any tips?

    Imported from legacy forums. Posted by ejj (had 2103 views)

    User (Old forums)
    Member
    Post count: 23064

    I don’t have C# installed, but I did convert that sample over to VB .NET and the separator appeared just fine in between the two text menu items.

    I put it in C# for you below:

    Xceed.SmartUI.Controls.MenuBar.MenuItem item1 = new Xceed.SmartUI.Controls.MenuBar.MenuItem( “Copy” );
    Xceed.SmartUI.Controls.MenuBar.MenuItem item2 = new Xceed.SmartUI.Controls.MenuBar.MenuItem( “Paste” );
    Xceed.SmartUI.Controls.MenuBar.MenuItem item3 = new Xceed.SmartUI.Controls.MenuBar.SeparatorMenuItem;

    dropDownMenu.Items.Add( item1 );
    dropDownMenu.Items.Add( item3 );
    dropDownMenu.Items.Add( item2 );

    In VB .NET you could do it like this (for the sample):

    dropDownMenu.Items.Add(New Xceed.SmartUI.Controls.MenuBar.MenuItem(“Copy”))
    dropDownMenu.Items.Add(New Xceed.SmartUI.Controls.MenuBar.SeparatorMenuItem)
    dropDownMenu.Items.Add(New Xceed.SmartUI.Controls.MenuBar.MenuItem(“Paste”))

    Imported from legacy forums. Posted by paulplatter (had 3209 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.