~~Title: OnDoubleClick ~~ The **OnDoubleClick** event can be implemented by a [[:scripting:script_add-ins|script add-in]] to receive notification when the user double-clicks on a file or folder in a tab. By default your event handler is passed an **[[..:scripting_objects:item|Item]]** object corresponding to the item that was double-clicked. Because constructing an Item object may take some time (e.g. on a network drive) you have the option for your handler to be called twice - once with only the path to the item, and a second time (if desired) with the full **Item** object. To do this: - Set the **[[..:scripting_objects:scriptinitdata|ScriptInitData]].early_dblclk** property to **True** when you initialize your script. - Your **OnDoubleClick** event will then be called with a the **early** property set to **True** in the **[[..:scripting_objects:doubleclickdata|DoubleClickData]]** object. - When **early** is **True**, the **item** property is not present; instead, the **path** property provides the full path of the object, and the **is_dir** property indicates whether the item is a folder or file. - When the **OnDoubleClick** method returns, it will be called a second time, with **early** set to **False** and a full **Item** object available in the **item** property. - If you sets the **skipfull** property to **True** in the **[[..:scripting_objects:doubleclickdata|DoubleClickData]]** object at the "early" stage, the second call to **OnDoubleClick** doesn't occur. $$ (#)**Method Name:** $$ OnDoubleClick $$ (#)**Argument Type:** $$ **[[..:scripting_objects:doubleclickdata|DoubleClickData]]**  $$ (#)**Return Type:** $$ //bool// or //string// $$ (#)**Description:** $$ The **DoubleClickData.tab** property identifies the tab, and the **item** property identifies the item that has been double-clicked. You can return two different types from this event: * //bool//: If you return **True**, the double-click will be cancelled and the file will not be opened. If you return **False** the double-click will be allowed to continue (this is the default). * //string//: You can return a //string// to change the function to be performed on the file. For example, you could return the string //"Show"// to run the internal **Show** command on the file.\\