com.smartgwt.client.widgets.form.fields.events

## Interface HasShowContextMenuHandlers

- All Superinterfaces:
    com.google.gwt.event.shared.HasHandlers
  All Known Implementing Classes:
    AutoFitTextAreaItem, BlurbItem, BooleanItem, ButtonItem, CancelItem, CanvasItem, CheckboxItem, ColorItem, ColorPickerItem, ComboBoxItem, DateItem, DateRangeItem, DateTimeItem, DoubleItem, FileItem, FloatItem, FormItem, HeaderItem, HiddenItem, IntegerItem, IPickTreeItem, LinkItem, MiniDateRangeItem, MultiComboBoxItem, MultiFileItem, NativeCheckboxItem, PasswordItem, PickTreeItem, PresetCriteriaItem, PresetDateRangeItem, RadioGroupItem, RelativeDateItem, ResetItem, RichTextItem, RowSpacerItem, SectionItem, SelectItem, SelectOtherItem, SliderItem, SpacerItem, SpinnerItem, StaticTextItem, SubmitItem, TextAreaItem, TextItem, TimeItem, ToolbarItem, UploadItem, ViewFileItem

      public interface HasShowContextMenuHandlers
      extends com.google.gwt.event.shared.HasHandlers

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.google.gwt.event.shared.HandlerRegistration` | `addShowContextMenuHandler(ShowContextMenuHandler handler)` Called when the mouse is right-clicked anywhere in this formItem.

    - ### Methods inherited from interface com.google.gwt.event.shared.HasHandlers

      `fireEvent`

- - ### Method Detail

    - #### addShowContextMenuHandler

          com.google.gwt.event.shared.HandlerRegistration addShowContextMenuHandler(ShowContextMenuHandler handler)

      Called when the mouse is right-clicked anywhere in this formItem. If the implementation returns false, default browser behavior is cancelled.

      Note that it can be bad practice to cancel this method if the mouse is over the data element for the item, because doing so would replace the builtin browser-default menus that users may expect. You can use `DynamicForm.getEventItemInfo()` to return an info object that can be used to determine which part of the item is under the mouse.

      Parameters:
        `handler` - the showContextMenu handler
      Returns:
        `HandlerRegistration` used to remove this handler