Created Cbutton object not showing in chart

 

Hello.
Question is clear . i trying to create a CButton object simply like this :

  CButton btn;
  Comment(btn.Create(0,"btn1",0,60,60,60,60));
  btn.Visible(true);
  btn.Color(clrRed);
  btn.Show();
  btn.Text("BTN");


But it isn't show anything in chart.Why?

 
Alireza Rezaee:

Question is clear . i trying to create a CButton object simply like this :

But it isn't show anything in chart.Why?

Because it's size 0...

Try changing the last two values:

Comment(btn.Create(0,"btn1",0,60,60,120,
120));
 
Seng Joo Thio:

Because it's size 0...

Try changing the last two values:

The problem is still there.

It has nothing to do with it
 
Alireza Rezaee:

The problem is still there.

It has nothing to do with it
That shows you have another issue - move your btn declaration to global. 
 
Seng Joo Thio:
That shows you have another issue - move your btn declaration to global. 

Thanks so much .that was the problem.

Reason: