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

54 lines
1.2 KiB
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.
# Selectable (Get Method)
Gets the flag indicating an ability of a graphical object to be selected. In other words - if the graphical object can be selected or not.
```
bool  Selectable() const
```
Return Value
Flag indicating the ability of the graphical object, attached to an instance of the class, to be selected. If there is no attached object, returns false.
# Selectable (Set Method)
Sets the flag indicating the ability of a graphical object to be selected.
```
bool  Selectable(
   bool  selectable      // value of the flag
   )
```
Parameters
selectable
[in]  New value of the flag indicating an ability of a graphical object to be selected.
Return Value
true - success, false - cannot change the flag.
Example:
```
//--- example for CChartObject::Selectable  
#include <ChartObjects\ChartObject.mqh>  
//---  
void OnStart()  
  {  
   CChartObject object;  
   //--- get the "selectable" flag of chart object   
   bool selectable_flag=object.Selectable();  
   if(selectable_flag)  
     {  
     //--- set the "selectable" flag of chart object  
     object.Selectable(false);  
     }  
  }  
```