Panel Developing - page 2

 

Confirming the resolution of the problem....

Because the panel is CAppDialog , then the approach to changing the visibility ( OBJPROP_HIDDEN parameter) of the panel will be a little different, since the graphical object manipulation methods (such as ObjectSetInteger() ) are used for normal graphical objects, not for CAppDialog objects.

To change the visibility of a CAppDialog , you would typically use the Show() or Hide() method provided by the CAppDialog class.

Then, in the OnChartEvent event, the following condition was created:

if (!panel.IsVisible())

{

panel.Show();

}

And under the conditions of .Pressed():

panel.Hide();

Sleep(1);


You must use 'Sleep' for it to work.


Thank you to everyone who helped, I would like to take this opportunity to leave links to two very explanatory articles that helped me a lot to learn how creating panels works:

https://www.mql5.com/pt/articles/4575#para2_2

https://www.mql5.com/pt/articles/4575#para4

Melhoramos o trabalho com Painéis, adicionando transparência, alterando a cor do plano de fundo e herdando da CAppDialog/CWndClient
Melhoramos o trabalho com Painéis, adicionando transparência, alterando a cor do plano de fundo e herdando da CAppDialog/CWndClient
  • www.mql5.com
Continuamos a estudar o trabalho com a CAppDialog. Agora, aprenderemos a como definir a cor de fundo, de borda e de barra de título para o painel gráfico. Consideraremos passo a passo como adicionar transparência à janela do aplicativo ao movê-la no gráfico. Em seguida, analisaremos a criação de descendentes da CAppDialog ou da CWndClient e veremos novas sutilezas ao trabalhar com controles. Finalmente, olharemos de uma nova perspectiva os novos Projetos.