Example #1
0
        public static MenuItem CreateMenuSet(Command cmd, bool autoHide = false, string label = null)
        {
            MenuCreator.CommandEntryHelper commandEntryHelper = label != null ? new MenuCreator.CommandEntryHelper(cmd, label) : new MenuCreator.CommandEntryHelper(cmd);
            commandEntryHelper.DisabledVisible = !autoHide;
            MenuItem menuItem = commandEntryHelper.GetMenuItem();

            menuItem.Submenu = (Widget)MenuCreator.CreatePopupMenu();
            return(menuItem);
        }
Example #2
0
        public static MenuItem CreateDelayCloseMenuItem(Command cmd, bool autoHide = false, string label = null)
        {
            MenuCreator.CommandEntryHelper commandEntryHelper = label != null ? new MenuCreator.CommandEntryHelper(cmd, label) : new MenuCreator.CommandEntryHelper(cmd);
            commandEntryHelper.DisabledVisible = !autoHide;
            MenuItem menuItem = commandEntryHelper.GetMenuItem();

            menuItem.HasTooltip          = false;
            menuItem.ButtonReleaseEvent += new ButtonReleaseEventHandler(MenuCreator.DelayHideMenuItemBtnReleasedHandler);
            return(menuItem);
        }