Another CPanelDialog

To add comments, please log in or register
blustacker
33
blustacker  

Hi,


Is it possibel to have 2 CPanelDialog on a chart? i mean i have a main CPanelDialog to have all the conditions of an EA, when i "check" the check box "view status", another CPanelDialog will appear with all status of the ea within it, the problem is when i "uncheck" the box function would be to remove the 2nd CPanelDialog in which it will not work not unless you close or unload both CPanelDialog.


I hope someone can help me with this one.


Thanks...

Anthony Garot
2277
Anthony Garot  
Is it possibel to have 2 CPanelDialog on a chart?

I haven't tried it, but it should be possible.

My thought is you would create both panels during OnInit() and simply hide the 2nd panel until you needed it.

Pseudo-code, not tested, not complete:

int OnInit()
{
    // panel 1
    ExtDialog1.Create(...);
    ExtDialog1.Run();

    // panel 2
    ExtDialog2.Create(...);
    ExtDialog2.Hide();
    ExtDialog1.Run();
}

void OnDeinit(const int reason)
{
    ExtDialog1.Destroy(reason);
    ExtDialog2.Destroy(reason);
}

. . . then in your code for the checkbox . . . 

    if ( showing )
    {
        ExtDialog2.Hide();
    }
    else
    {
        ExtDialog2.Show();
    }
blustacker
33
blustacker  
Anthony Garot:

I haven't tried it, but it should be possible.

My thought is you would create both panels during OnInit() and simply hide the 2nd panel until you needed it.

Pseudo-code, not tested, not complete:

Thanks.


But the problem now is that when mt4 client terminal updates to the new release, CPanel objects behaving weird, like combobox does not function anymore. Buttons also does not work, i mean i created 2 buttons with different event which is mapped to each button but when i press the 2nd button, the function of the 1st button will execute. I dont know if you have also experience this.
To add comments, please log in or register