Files
mql5-skills/skills/mql5/references/docs/34-standardlibrary/2152-standardlibrary-chart-object-classes-cchartobject-cchartobjectdescription.md
T
2026-06-23 21:47:51 +08:00

54 lines
1020 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Description (Get Method)
Gets a description (text) of a graphical object.
```
string  Description() const
```
Return Value
Description (text) of the graphical object attached to an instance of the class. If there is no attached object, it returns NULL.
# Description (Set Method)
Sets the description (text) of the graphical object.
```
bool  Description(
   string  text      // text
   )
```
Parameters
text
[in]  New description (text) of a graphical object.
Return Value
true - success, false - cannot change the description (text).
Example:
```
//--- example for CChartObject::Description 
#include <ChartObjects\ChartObject.mqh> 
//--- 
void OnStart() 
  { 
   CChartObject object; 
   //--- get description of chart object  
   string description=object.Description(); 
   if(description=="") 
     { 
      //--- set description of chart object 
      object.Description("MyObject"); 
     } 
  } 
```