DrawingObject Class
A base class that all drawing objects derive from, which contains properties and events common to all drawing objects as defined below. See About Drawing Objects for more information on using drawing objects.
The Persist property allows the default behavior of drawing objects created in an indicator using the “Update value intra-bar” setting to be overridden. By default, the EasyLanguage run-time environment will not allow multiple instances of a drawing object to be created on an intra-bar basis. This behavior is intended to simplify the code required when creating drawing objects. If the Persist property is set to True, multiple instances can be created. This property is useful when creating drawing objects in events not related to bar updates. Note this is an advanced feature and in most cases, should be left with the default value False.
Namespace: elsystem.drawingobjects
Properties
Additional properties, methods, and events are described in the classes listed under Inheritance Hierarchy (see below).
Name | Type | Description | |
AutoShow | bool | Reserved for future enhancement. | |
Color | object | Gets or sets the Color object representing the color of the drawing object (or border color in the case of Rectangle and Ellipse objects). See Color class. | |
Count | int | Gets an integer representing the number of points in the drawing object collection. | |
ID | int | The ID assigned to legacy TrendLines and TextLabels. For all non-legacy drawing objects the ID is -1. | |
Lock | bool | True indicates that the user may not drag the drawing object on a chart; False allows dragging. | |
OverrideTooltips | bool | True indicates that the drawing object overrides the displays of tooltips. | |
Persist | bool | True if the drawing object instance should remain displayed between intra-bar updates. The default behavior is False which expects that your code will recreate the drawing object on each tick update. | |
Points[Indx] | object | Gets or sets a element within the collection of points used to create the drawing object. | |
ShowInPlotSubgraph |
bool | True indicates that this drawing object will be displayed in a subgraph. | |
Tag | object | Gets or sets an arbitrary value that allows you to store additional info with the drawing object. |
Methods
Name | Description | |
ClearTooltips() | Clears all the ToolTip rows associated with the DrawingObject. | |
RemoveTooltipRow(index) | Removes a ToolTip row at the specified index. | |
SetTooltipHeader(text) | Sets the text for the header of the DrawingObject ToolTip. Note that at least one row must exist for the ToolTip to display. | |
SetTooltipRow(index,column1,column2) |
Sets the ToolTip row at the specified index. The text string column 1 appears in the left column and text string column 2 appears in the right column. |
Events
Name | Description | |
Click |
Occurs when the DrawingObject is clicked. The handler method's args parameter should be of type DrawingObjectEventArgs. | |
Moved | Occurs while the Drawing Object has been moved and the mouse has been released. Also occurs if any of the DOPoints for the DrawingObject is changed. The handler method's args parameter should be of type DrawingObjectMovedEventArgs. | |
|
Occurs while the Drawing Object is being moved. The handler method's args parameter should be of type DrawingObjectMovedEventArgs. | |
SubGraphResize |
Occurs when a subgraph is resized, including its first display.The handler method's args parameter should be of type SubGraphResizeEventArgs. |