Discussion of article "DoEasy. Controls (Part 17): Cropping invisible object parts, auxiliary arrow buttons WinForms objects"

 

New article DoEasy. Controls (Part 17): Cropping invisible object parts, auxiliary arrow buttons WinForms objects has been published:

In this article, I will create the functionality for hiding object sections located beyond their containers. Besides, I will create auxiliary arrow button objects to be used as part of other WinForms objects.

Compile the EA and launch it on the chart:


Cropping areas that go beyond the visibility scope works correctly, headers that go beyond the container are cropped along its edge, and if we set the coordinates of the TabControl so that the element goes beyond the container on the left, then everything is cropped correctly here, too - the element itself is cropped along the edges of the panel, and buttons located on the control are also cropped by the edge of the panel visibility scope, rather than their containers. Everything works correctly here. Horizontal left-right buttons have a width that is smaller than the default one (9 pixels). Despite this, they are displayed correctly.
What needs to be fixed? The shadow object appears before the panel that casts it. I will deal with this later.

Author: Artyom Trishkin

 
It's strange to see such a weak response from the community. Doesn't anyone need graphical interfaces anymore. At one time there were heated discussions around this topic. Apparently the ranks have thinned a lot. It's a pity.

Only now I found time to read the code of this series in more detail and was pleasantly surprised. Finally, after so many years, someone has matured and decided to start a new round of evolution in the development of graphical interfaces in MQL, taking into account the shortcomings of all previous iterations by other authors.

Just recently, after a long pause in MQL-development, I started working on a new version of EasyAndFastGUI library, but now I see that it will soon become irrelevant for the community of MQL-developers, as this version already has a base that will allow to implement a much more interesting solution.

I hope that the project will be finalised and maybe even replace the graphical part of the standard library. I will be glad to use it in my projects, if all the minimum necessary for me, which is implemented in EasyAndFastGUI and much more, will be realised.

Of course there is still a lot of work to do, but I'm sure the author will do it.

Good luck!
EasyAndFastGUI - библиотека для создания графических интерфейсов
EasyAndFastGUI - библиотека для создания графических интерфейсов
  • www.mql5.com
Библиотека EasyAndFastGUI дает возможность создавать графические интерфейсы для своих MQL-программ.
 
Anatoli Kazharski #:
It's strange to see such a weak response from the community. Doesn't anyone need graphical interfaces anymore. At one time there were heated discussions around this topic. Apparently the ranks have thinned a lot. It's a pity.

Only now I found time to read the code of this series in more detail and was pleasantly surprised. Finally, after so many years, someone has matured and decided to start a new round of evolution in the development of graphical interfaces in MQL, taking into account the shortcomings of all previous iterations by other authors.

Just recently, after a long pause in MQL-development, I started working on a new version of EasyAndFastGUI library, but now I see that it will soon become irrelevant for the community of MQL-developers, as this version already contains a base that will allow to implement a much more interesting solution.

I hope that the project will be finalised and maybe even replace the graphical part of the standard library. I will be glad to use it in my projects, if all the minimum necessary for me, which is implemented in EasyAndFastGUI and much more, will be realised.

There is still a lot of work to be done, but I'm sure the author will do it.

Success!

I needed to create an interface, but there was not a single library with well worked out events, correct window management in terms of their mutual location, overlaps and scope restrictions. If somewhere there were the above things with varying degrees of elaboration, there were problems with creating, deleting windows and changing properties at an arbitrary point in time.

This should all be the backbone of GUIs. Why they immediately start doing "drawing" is not clear.

I made some small changes to the source code of the current article in the Expert Advisor:

//--- Создадим объект WinForms Panel
for(int i1=0; i1<2; i1++)
     {
      CPanel *pnl=NULL;
      pnl=engine.CreateWFPanel("WFPanel"+string(i1),50,50,410,200,array_clr,200,true,true,false,-1,FRAME_STYLE_BEVEL,true,false);
      ...
     }

I played a little with the panels, the result is as follows:

Switching the window to the foreground occurs when the mouse is clicked, although it should be when you click.

Receiving events occurs through the indicator, probably for the tester was made, without it events do not work, in the tester too, even when loading the indicator through the template....

 
Anatoli Kazharski #:
It's strange to see such a weak response from the community. Doesn't anyone need graphical interfaces anymore. At one time there were heated discussions around this topic. Apparently the ranks have thinned a lot. It's a pity.

Only now I found time to read the code of this series in more detail and was pleasantly surprised. Finally, after so many years, someone has matured and decided to start a new round of evolution in the development of graphical interfaces in MQL, taking into account the shortcomings of all previous iterations by other authors.

Just recently, after a long pause in MQL-development, I started working on a new version of EasyAndFastGUI library, but now I see that it will soon become irrelevant for the community of MQL-developers, as this version already contains a base that will allow to implement a much more interesting solution.

I hope that the project will be finalised and maybe even replace the graphical part of the standard library. I will be glad to use it in my projects, if all the minimum necessary for me, which is implemented in EasyAndFastGUI and much more, will be realised.

There is still a lot of work to be done, but I'm sure the author will do it.

Success!
Thank you, Anatoly, for your feedback. Of course, everything will be finalised.
I would like to know what you would like to see here, what functionality?
Feedback is very much lacking.
 
Aliaksandr Hryshyn #:

I needed to create an interface, but there was not a single library with well worked out events, correct window management in terms of their mutual location, overlaps and scope restrictions. If somewhere there were the above things with varying degrees of elaboration, there were problems with creating, deleting windows and changing properties at an arbitrary point in time.

This should all be the backbone of GUIs. Why they start doing "drawing" right away is not clear.

I made some minor changes to the source code of the current article in the Expert Advisor:

I played a little with the panels, the result is as follows:

The window is switched to the foreground when the mouse is pressed, although it should be pressed.

Receiving events is done through the indicator, probably for the tester, without it the events do not work, in the tester too, even when loading the indicator through the template....

Listening of events from another chart is implemented through the indicator-spy.
If you have another better way, please suggest, we will consider it.
Events do not work in the tester as it is.
Thank you for pointing out the defect - we will fix it, it is still at the development stage. The very backbone you are talking about.
 

What are the events from other charts for?

I clicked on my visual application, your Expert Advisor is running in parallel, and this is written in the logs:

2022.09.10 22:18:36.256 TestDoEasy117 (AUDUSD,M1)       Графическая метка "1716653226_u_0": ID 10001, 2022.09.10 22:16:34
2022.09.10 22:18:36.256 TestDoEasy117 (AUDUSD,M1)       OnChartEvent: Состояние кнопки: Отжата
2022.09.10 22:18:36.256 TestDoEasy117 (AUDUSD,M1)       OnChartEvent: Изменено свойство графического объекта:
2022.09.10 22:18:36.256 TestDoEasy117 (AUDUSD,M1)       Графическая метка "1716653226_u_0": ID 10001, 2022.09.10 22:16:34
2022.09.10 22:18:36.256 TestDoEasy117 (AUDUSD,M1)       OnChartEvent: Имя BMP-файла:
2022.09.10 22:18:36.256 TestDoEasy117 (AUDUSD,M1)        - Состояние "On" [0]: "\Experts\Greshnik\Strategy_viewer.ex5::1716653226_u_012896816886410156413404032"
2022.09.10 22:18:36.256 TestDoEasy117 (AUDUSD,M1)        - Состояние "Off" [1]: Отсутствует
2022.09.10 22:18:38.291 TestDoEasy117 (AUDUSD,M1)       CGStdGraphObj::PropertiesCheckChanged: Создан снимок истории изменений графического объекта #19: 2022.09.09 23:54:59.875
2022.09.10 22:18:38.291 TestDoEasy117 (AUDUSD,M1)       OnChartEvent: Изменено свойство графического объекта:
2022.09.10 22:18:38.291 TestDoEasy117 (AUDUSD,M1)       Графическая метка "1716653226_u_0": ID 10001, 2022.09.10 22:16:34
2022.09.10 22:18:38.291 TestDoEasy117 (AUDUSD,M1)       OnChartEvent: Время создания: 2022.09.10 22:18:38
2022.09.10 22:18:38.291 TestDoEasy117 (AUDUSD,M1)       OnChartEvent: Изменено свойство графического объекта:
2022.09.10 22:18:38.291 TestDoEasy117 (AUDUSD,M1)       Графическая метка "1716653226_u_0": ID 10001, 2022.09.10 22:16:34
2022.09.10 22:18:38.291 TestDoEasy117 (AUDUSD,M1)       OnChartEvent: Имя BMP-файла:
2022.09.10 22:18:38.291 TestDoEasy117 (AUDUSD,M1)        - Состояние "On" [0]: "\Experts\Greshnik\Strategy_viewer.ex5::1716653226_u_012896816886410156413395097"
2022.09.10 22:18:38.291 TestDoEasy117 (AUDUSD,M1)        - Состояние "Off" [1]: Отсутствует
2022.09.10 22:18:38.959 TestDoEasy117 (AUDUSD,M1)       CGStdGraphObj::PropertiesCheckChanged: Создан снимок истории изменений графического объекта #20: 2022.09.09 23:54:59.875

I don't understand the purpose of this.


It is very slow to count. What will happen to the table with a large number of cells?

Measuring the speed of updating graphical objects:

//--- Handling events of a collection of graphic items
   ulong mcs=GetMicrosecondCount();
   engine.GetGraphicObjCollection().OnChartEvent(id,lparam,dparam,sparam);
   Print((GetMicrosecondCount()-mcs)/1000.0);

Left mouse click on the centre of the panel: 5ms

Clicking on the header of an active tab: 7 ms.

Clicking on the header of an inactive tab: 20 ms


 
Aliaksandr Hryshyn #:

What are the events from the other charts for?

I clicked my visual application, your Expert Advisor is running in parallel, the logs show this:

I don't understand the purpose of this.


It is very slow to count. What will happen to the table with a large number of cells?

Measuring the speed of updating graphic objects:

Left mouse click on the centre of the panel: 5 ms

Clicking on the active tab header: 7 ms

Click on the header of an inactive tab: 20 ms


The library scans the entire environment and outputs messages about logged events. At the moment these are just debugging messages - the library is under development. When it is fully functional, there will be a choice of what is needed and what is not needed.

 
Artyom Trishkin #:
Thank you, Anatoly, for your feedback. Of course, everything will be finalised.
I would like to know what you would like to see here, what functionality?
Feedback is very much lacking.

The minimum needs are covered with EasyAndFastGUI. Maybe release the latest version in the marketplace for a small fee, as there is not much time for free support.

As it is, this topic can be developed endlessly. There are so many different options, where this could all lead to, that it's fantastic. )

We'll come back to this issue again. Very busy for now. Keep up the good work, it's very exciting! 👍

 
Anatoli Kazharski #:

I have my minimum needs covered with EasyAndFastGUI. Probably release the latest version in the marketplace for a small fee, as there is not much time for free support.

As it is, this topic can be developed endlessly. There are so many different options, where this could all lead to, that it's fantastic. )

We'll come back to this question again. Very busy for now. Keep up the good work, it's very exciting! 👍

Dobro 👌