Download MetaTrader 5

It is possible to add controls to CPanel?

To add comments, please log in or register
gbulle
127
gbulle  

Hello,


I have a dialog and I added to this dialog a CPanel control: . everything is OK.

Now I would like to add  controls to cpanel so that when I hide/show the cpanel  all controls disappear/appear.


How to to do? No ADD function for cpanel......


Thanks

MT4 build 765
Drazen Penic
2698
Drazen Penic  

There is example indicator in the indicators folder.

In Metaeditor look into Indicators\Examples\SimplePanel

gbulle
127
gbulle  

Thanks... but the question is slight different...

I want to add  to a dialog another control (CPanel) and then add controls to CPanel object,

in pseudo-code:

dialog=CreateDialog()

button=CreateButton()

dialog.Add(button)  ->  my dialog with button

cpanel=CreateCpanel()

button2=CreateButton2()

cpanel.Add(button2)  --> my panel with button2

dialog.Add(Cpanel)  my dialog with   button + one panel with  button2; if I hide cpanel I hide button2 too!!

Drazen Penic
2698
Drazen Penic  

Did you try that with CWndContainer class instead of CPanel?

CWndContainer has Add() function.

Also, CDialog is derived from that class.

I never tried that, but it may work. 

To add comments, please log in or register