Discussing the article: "Creating an Interactive Graphical User Interface in MQL5 (Part 1): Making the Panel" - page 2

 
Виктор Нежельский #:

As a beginner in MQL5, I liked the article very much. Thank you for the article. But I thought that the deinitialisation function can be significantly reduced if ObjectDelete is executed in a loop through all created and saved names of graphical objects. To do this, you need to add an array of strings, a counter of graphical objects and operators for passing names to the array in the functions of creating and initialising parameters of graphical objects. I have done it this way:

I also added:

And in the create function I refined it like this:

Wow. Thanks for the kind feedback and review. 
That is an advanced way of optimizing the program using multi-line macros. This will be further useful to more readers. Thanks for sharing.

 
Виктор Нежельский #:

And I changed the functions of creating graphic objects a little bit:

Sure. Thanks for sharing.

 
But you can delete all your graphical objects even easier if you use a prefix to their names. Then it can be done with one command ObjectsDeleteAll(0, pref).
 
Виктор Нежельский ObjectsDeleteAll(0, pref).

You can't change the prefix to traid objects. But the idea is correct, all the names of these objects start the same way. So you can use the beginning of the object name as a prefix.

 
Виктор Нежельский #:
But you can delete all your graphical objects even easier if you use a prefix to their names. Then it can be done with one command ObjectsDeleteAll(0, pref).

Sure

 
Alexey Viktorov #:

You can't change the prefix to traid objects. But the idea is correct, all the names of these objects start the same way. So you can use the beginning of the object name as a prefix.

Sure

 
but is possible create tabs?