[Mono-winforms-list] Menu: return key on popup

Everaldo Canuto everaldo.canuto at gmail.com
Thu Jul 31 17:05:38 EDT 2008


Hey,

Please fill a bug report and attach the patch, will be also great if
you assign it to me ;-)

Everaldo.

On Thu, Jul 31, 2008 at 4:51 PM, Ernesto <equistango at gmail.com> wrote:
>
> Hi,
>
> When you are using the keyboard to navigate a menu and open a popup menu by
> selecting an option with the return (enter) key, the popup appears, but no
> option within the popup is selected.
>
> MenuAPI handles the right cursor key correctly, but lacks this for the
> return key.
>
> This patch makes the menu API select the first option of a popup when
> opening the popup via return key.
>
> Regards,
> Ernesto
>
>
> Index: MenuAPI.cs
> ===================================================================
> --- MenuAPI.cs  (revision 109381)
> +++ MenuAPI.cs  (working copy)
> @@ -795,9 +795,14 @@
>                                                GrabControl.ActiveTracker =
> this;
>                                        }
>                                        return true;
> +                               } else if (CurrentMenu.SelectedItem.IsPopup)
> {
> +                                       item = CurrentMenu.SelectedItem;
> +                                       ShowSubPopup (CurrentMenu, item);
> +                                       SelectItem (item, item.MenuItems
> [0], false);
> +                                       CurrentMenu = item;
> +                               } else {
> +                                       ExecFocusedItem (CurrentMenu,
> CurrentMenu.SelectedItem);
>                                }
> -
> -                               ExecFocusedItem (CurrentMenu,
> CurrentMenu.SelectedItem);
>                                break;
>
>                        case Keys.Escape:
>
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>
>


More information about the Mono-winforms-list mailing list