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

 

A great article.

Thank you Vladimir Karputov !

 

Hi Vladimir,

thx for this article...

Who (or what class) is actually using the defined constants, e.g. CONTROLS_BUTTON_COLOR_BG

I could not find any code having access to these constants. So there is still a huge piece of the big picture that I don't fully understand.

 
Ivan Petkow :

Hi Vladimir,

thx for this article...

Who (or what class) is actually using the defined constants, e.g.  CONTROLS_BUTTON_COLOR_BG

I could not find any code having access to these constants. So there is still a huge piece of the big picture that I don't fully understand.

I searched the word "CONTROLS_BUTTON_COLOR_BG" in the MetaEditor editor:

I found 26 entries!

 
Vladimir Karputov:

I searched the word "CONTROLS_BUTTON_COLOR_BG" in the MetaEditor editor:

I found 26 entries!

Searching in the MetaEditor helped me already a bit further: at least I have found what I initially searched for. The constant is used in the CButton constructor.

But what really confuses me now is the fact, that I have found only 2 entries (instead of >20 like you did):

....MQL5\Include\Controls\Button.mqh (line 54)

....MQL5\Include\Controls\Defines.mqh (line 58)


Is there any source code outside of the path C:\Users\xxx\AppData\Roaming\MetaQuotes\Terminal\XXXXXXXXXXXXXXXXXXXXXX\MQL5\

where I searched in all *.mq5;*.mqh files?


 
Ivan Petkow :

Searching in the MetaEditor helped me already a bit further: at least I have found what I initially searched for. The constant is used in the CButton constructor.

But what really confuses me now is the fact, that I have found only 2 entries (instead of >20 like you did):

....MQL5\Include\Controls\Button.mqh (line 54)

....MQL5\Include\Controls\Defines.mqh (line 58)


Is there any source code outside of the path C:\Users\xxx\AppData\Roaming\MetaQuotes\Terminal\XXXXXXXXXXXXXXXXXXXXXX\MQL5\

where I searched in all *.mq5;*.mqh files?


Yes, my search results (more than 20) are my projects. In system files "CONTROLS_BUTTON_COLOR_BG" is found in MQL5\Include\Controls\Button.mqh

 //+------------------------------------------------------------------+ 
 //| Constructor                                                      | 
 //+------------------------------------------------------------------+ 
CButton::CButton( void )
  {
   m_color           =CONTROLS_BUTTON_COLOR;
    m_color_background=CONTROLS_BUTTON_COLOR_BG; 
   m_color_border    =CONTROLS_BUTTON_COLOR_BORDER;
  }

and in MQL5\Include\Controls\Defines.mqh

 //--- Button 
 #define  CONTROLS_BUTTON_COLOR               C'0x3B,0x29,0x28' 
 #define  CONTROLS_BUTTON_COLOR_BG             C'0xDD,0xE2,0xEB' 
 #define  CONTROLS_BUTTON_COLOR_BORDER         C'0xB2,0xC3,0xCF' 
 
Vladimir Karputov:

Yes, my search results (more than 20) are my projects. In system files "CONTROLS_BUTTON_COLOR_BG" is found in MQL5\Include\Controls\Button.mqh

and in MQL5\Include\Controls\Defines.mqh

OK, this matches with what I observed...

Thank you for confirmation and your precious time. 

 

Hi!

In the examples:

1. Place the Panel on the chart of a financial instrument.

2. Go to the chart of an arbitrary financial instrument opened in another window.

3. Return to the chart window with the Panel.

4. The Panel is in the upper left corner of the chart in the minimised state.


How can we make the Panel not be minimised when we return to the chart window where it is placed?


It is clear that it is necessary to handle events, but I am confused :) ...

Thanks for the explanation.

 
Is it possible to create a panel on mql4?
Thank you very much in advance.
 
Irina Dymura:
Is it possible to create a panel on mql4?
Thank you very much in advance.

Try the codes from the article - they should work.

 

Thanks A LOT for this article!


I was struggling with UI elements for a while... Searching through the MQL site I only found totally Rocket Science articles where you have OO objects needed to be used and instantiated as another complex OO objects! Totally insane!

The main goal of OO Classes is to be accessible, bring you totally clean code and reduce the number of lines/errors/iterations...

I know... there are several limitations with this implementation/approach, but for beginners, it is a huge STEP FORWARD to have something real implemented right away!

Congratulations on this Super Cool Article!


;)