Customization > Extensibility Through Profiles, Stereotypes, Tag Definitions and Scripts > Advanced extensibility through stereotype scripts and script items > Extending double-click behavior through stereotypes and scripts > Changing double-click behavior through a stereotype
  
Changing double-click behavior through a stereotype
Typically, you will want to create Stereotypes within a profile Package.
This topic documents creating a Stereotype through the Packages pane. For information about using a Profile Diagram to create a Stereotype, specify valid model item types and define Scripts, click here
To change double-click behavior through a Stereotype:
1. Right-click the profile Package, point to New, point to UML, point to Profiles, and then click Stereotype
2. Type a name for the Stereotype, and then press the Enter key.
If you want the display name of the Stereotype in Modeler to be different from its real name: on the General tab of the Stereotype's property pages, type the display name in the Name Alias box.
3. Open the Stereotype's Property Pages, and select valid item and diagram types for the Stereotype (the Stereotype can be applied only to diagrams whose type is valid):
a. Click the Items tab.
b. In the drop-down list box select Model Item Types, and then click the Link button.
c. In the middle or right pane, select the check boxes associated with valid item and diagram types.
d. In the middle or right pane, clear the check boxes associated with invalid item and diagram types.
e. Click OK
4. Click the UI Events.
5. Select the Double Click check box.
6. In the associated box, type the script.
If you want to change the text in a larger window with the Text Format Toolbar available, click the Editor button.
Write the script within the RunDoubleClickUI and CommitDoubleClick functions. For more information, Script functions, attributes and objects - double-click scripts Script functions, attributes and objects - overview Script template for double click scripts
The script will be run whenever an item or diagram that is stereotyped directly by the Stereotype is double-clicked.
* 
When you apply a double-click script to an item, the default double-click action is not performed.