Gdk.EventButton Class
Used for button press and button release events.

See Also: EventButton Members

Syntax

public class EventButton : Event

Remarks

Used for button press and button release events. The type field will be one of EventType.ButtonPress, EventType.TwoButtonPress, EventType.ThreeButtonPress, and EventType.ButtonRelease

Double and triple-clicks result in a sequence of events being received. For double-clicks the order of events will be:

  1. Gdk.EventType.ButtonPress
  2. Gdk.EventType.ButtonRelease
  3. Gdk.EventType.ButtonPress
  4. Gdk.EventType.TwoButtonPress
  5. Gdk.EventType.ButtonRelease

Note that the first click is received just like a normal button press, while the second click results in a Gdk.EventType.TwoButtonPress being received just after the Gdk.EventType.ButtonPress. Triple-clicks are very similar to double-clicks, except that Gdk.EventType.ThreeButtonPress is inserted after the third click. The order of the events is:

  1. Gdk.EventType.ButtonPress
  2. Gdk.EventType.ButtonRelease
  3. Gdk.EventType.ButtonPress
  4. Gdk.EventType.TwoButtonPress
  5. Gdk.EventType.ButtonRelease
  6. Gdk.EventType.ButtonPress
  7. Gdk.EventType.ThreeButtonPress
  8. Gdk.EventType.ButtonRelease

For a double click to occur, the second button press must occur within 1/4 of a second of the first. For a triple click to occur, the third button press must also occur within 1/2 second of the first button press.

Requirements

Namespace: Gdk
Assembly: gdk-sharp (in gdk-sharp.dll)
Assembly Versions: 2.12.0.0