CButton + Controls/Button.mqh

 

I have the following code

#include<Controls/Button.mqh>
CButton ObjDAL;

ObjDAL.Create(0, "objdal", 1, 20,20, 170, 45); ObjDAL.Text("Alert Dist: " + IntegerToString(DBMA)); ObjDAL.Color(colbt); ObjDAL.ColorBackground(colbf);

At present the Button defaults to the Upper Left Corner.

Objective 1: To position button at Lower Right Corner or any other corner.

So looking for equivalent of 

 ObjectSetInteger(0,ObjDA,OBJPROP_CORNER,3);

 I cannot see any corner function in the Controls\Button.mqh file...

...looks like this has no corner function and relies x y positioning....  

Objective 2: Locate relevant documentation - does MetaQuotes have applicable documentation ?


If my reply unnecessary - thanks in advance

 
file45:

I have the following code

At present the Button defaults to the Upper Left Corner.

Objective 1: To position button at Lower Right Corner or any other corner.

So looking for equivalent of 

 I cannot see any corner function in the Controls\Button.mqh file...

Objective 2: Locate relevant documentation - does MetaQuotes have applicable documentation ?


If my reply unnecessary - thanks in advance


This object is for adding buttons to control panels. You should use this instead - 

#include <ChartObjects\ChartObjectsTxtControls.mqh>

CChartObjectButton button;

button.Corner(CORNER_RIGHT_LOWER);
https://www.mql5.com/en/docs/standardlibrary/chart_object_classes/obj_controls/cchartobjectbutton
Documentation on MQL5: Standard Library / Graphic Objects / Control Objects / CChartObjectButton
Documentation on MQL5: Standard Library / Graphic Objects / Control Objects / CChartObjectButton
  • www.mql5.com
Standard Library / Graphic Objects / Control Objects / CChartObjectButton - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: