Discussion of article "How to create a graphical panel of any complexity level" - page 5

 
ctrading :

***

2. My other question was what are obj and Name(); as shown below.  I get obj is probably an object and the name part is for the name of the object.  However if I put obj.Name(); into any other code it doesn't understand it, so I know its unique to something from above.  I just wasn't sure how it fits in.

obj.Name();

***

The obj variable lives only during one iteration of the for loop .

 

Thanks a lot for your article!

I'm a begginer programmer and I'm trying to create a much more complex panel.

I'm stucked some days to create CLabel and CButton in the class header.

As I'll use a lot of labels with the same text, like a "dash" for example

I'm trying to find some kind of looping or an array to create a lot of Labels in the class header (private):

class CTradePanel : public CAppDialog
  {
private:
   
   CLabel            dashs[100];   //Create a lot of dashs on panel
  }


How can I fill an array with "labels"?

My idea is after that, I will call some kind of function bellow:

for(int i=0 ; i<100 ; i++)
      {
       string dash_name = "dash_"+IntegerToString(i);
       if(!CreateLabel(chart,subwin,dash_name,"-",5*i,5*i))
         {
          return false;
         }
      }

But, it return the error: "'dash_name' - parameter conversion not allowed"

So. How can I fill an array with "CLabel" and than I use this "labels" in a for looping function? 

Is there anyone could help me?

 
Guilherme Mendonca :

Thanks a lot for your article!

I'm a begginer programmer and I'm trying to create a much more complex panel.

I'm stucked some days to create CLabel and CButton in the class header.

As I'll use a lot of labels with the same text, like a "dash" for example

I'm trying to find some kind of looping or an array to create a lot of Labels in the class header (private):


How can I fill an array with "labels"?

My idea is after that, I will call some kind of function bellow:

But, it return the error: "'dash_name' - parameter conversion not allowed"

So. How can I fill an array with "CLabel" and than I use this "labels" in a for looping function? 

Is there anyone could help me?

You need to connect the CArrayObj class. And act on the example of the help.

Documentation on MQL5: Standard Library / Data Collections / CArrayObj
Documentation on MQL5: Standard Library / Data Collections / CArrayObj
  • www.mql5.com
CArrayObj - Data Collections - Standard Library - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 

Can anyone help me create a panel of buttons like the photo that use Standard Library?


 
gravediggerMT4 :

Can anyone help me create a panel of buttons like the photo that use Standard Library?


Code examples can be found in the MQL5 Help: Panels and Dialogs

Documentation on MQL5: Standard Library / Panels and Dialogs
Documentation on MQL5: Standard Library / Panels and Dialogs
  • www.mql5.com
Panels and Dialogs - Standard Library - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Thank you. I'm newbe, I am learning to code by myself. I can't code myself. I am trying to read the code myself and understand it. Can you code example for me?
 
gravediggerMT4 :
Thank you. I'm newbe, I am learning to code by myself. I can't code myself. I am trying to read the code myself and understand it. Can you code example for me?

I gave a link to examples in the post above ... Study.

 

Hi Vladimir

Thank you for your article. It's very useful.

I'm trying to make a panel in separate window to be accessible and shown in all charts once attached to one of them. Is there any standard solution for that?

 
Seyyed Mohammad :

Hi Vladimir

Thank you for your article. It's very useful.

I'm going to make a panel in separate window to be accessible and shown on all chars once attached to one of them. Is there any standard solution for that?

Search CodaBase for 'Panel'.

 
Vladimir Karputov:

Search CodaBase for 'Panel'.

What is CodeBase? a web site?

Reason: