The Autodesk.Revit.UI.DoubleClickOptions
class provides options for double-click events in the Revit user interface.
System.Windows.Forms.Keys
System.Double
bool
int
System.Type
string
//Create a new DoubleClickOptions object with Ctrl key as modifier and 200ms timeout
Autodesk.Revit.UI.DoubleClickOptions options = new Autodesk.Revit.UI.DoubleClickOptions(System.Windows.Forms.Keys.Control, 200);
//Set the DoubleClickOptions for a button in Revit user interface
button.SetDoubleClickOptions(options);
The Autodesk.Revit.UI.DoubleClickOptions
class can be used to control the behavior of double-click events for buttons and other user interface elements in Revit. The modifier keys can be set to any combination of None
, Shift
, Ctrl
, and Alt
. The timeout specifies the maximum time between clicks for the event to be considered a double-click.
Note that the Autodesk.Revit.UI.DoubleClickOptions
class is only applicable to double-click events in the Revit user interface. It does not affect double-click events in other contexts, such as mouse events in custom Revit add-ins.