tags:

views:

23

answers:

1

I want to add a MenuToolItem to my Toolbar. It contains two RadioMenuItems. However, when I click the drop-down arrow, I see this:

alt text

This is my current code:

MenuToolButton reviewModeToolButton =
    new MenuToolButton (Stock.Preferences);
toolbar.Add (reviewModeToolButton);

Menu reviewModeMenu = new Menu ();
reviewModeToolButton.Menu = reviewModeMenu;

RadioMenuItem normalMenuItem = new RadioMenuItem ("Normal Mode");
RadioMenuItem cramMenuItem =
    new RadioMenuItem (normalMenuItem, "Cram Mode");
reviewModeMenu.Add (normalMenuItem);
reviewModeMenu.Add (cramMenuItem);

What am I doing wrong?

+1  A: 

Add at the end:

reviewModeMenu.ShowAll ();

At default newly created widgets are not in visible state.

silk