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

# Interface HasShowContextMenuHandlers

All Superinterfaces:
  `HasHandlers`

All Known Implementing Classes:
  `AIDataQuestionItem`, `AutoFitTextAreaItem`, `BlurbItem`, `BooleanItem`, `ButtonItem`, `CancelItem`, `CanvasItem`, `CheckboxItem`, `ColorItem`, `ColorPickerItem`, `ComboBoxItem`, `DateItem`, `DateRangeItem`, `DateTimeItem`, `DoubleItem`, `FileItem`, `FileUploadItem`, `FloatItem`, `FormItem`, `HeaderItem`, `HiddenItem`, `IntegerItem`, `IPickTreeItem`, `LinkItem`, `MiniDateRangeItem`, `MultiComboBoxItem`, `MultiFileItem`, `MultiPickerItem`, `NativeCheckboxItem`, `PasswordItem`, `PickTreeItem`, `PresetCriteriaItem`, `PresetDateRangeItem`, `RadioGroupItem`, `RelativeDateItem`, `ResetItem`, `RichTextItem`, `RowSpacerItem`, `SavedSearchItem`, `SectionItem`, `SelectItem`, `SelectOtherItem`, `SetFilterItem`, `ShuttleItem`, `SliderItem`, `SpacerItem`, `SpinnerItem`, `StaticTextItem`, `SubmitItem`, `TextAreaItem`, `TextItem`, `TimeItem`, `ToggleItem`, `ToolbarItem`, `UploadItem`, `ViewFileItem`

public interface HasShowContextMenuHandlers extends HasHandlers

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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 Details

  - ### addShowContextMenuHandler

    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