Download MetaTrader 5

It is possible to add controls to CPanel?

To add comments, please log in or register
Find out how to use widgets at MQL5.community
gbulle
127
gbulle 2015.05.11 12:43 

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
2546
Drazen Penic 2015.05.11 15:22  

There is example indicator in the indicators folder.

In Metaeditor look into Indicators\Examples\SimplePanel

gbulle
127
gbulle 2015.05.11 19:13  

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
2546
Drazen Penic 2015.05.11 22:21  

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