Discussion of article "Graphical interfaces VIII: the calendar control (Chapter 1)"

 

New article Graphical interfaces VIII: the calendar control (Chapter 1) has been published:

In the chapter VIII of the series of articles dedicated to creating graphical interfaces in MetaTrader, we will consider complex composite controls like calendars, tree view, and file navigator. Due to the large amount of information, there are separate articles written for every subject. The first chapter of this part describes the calendar control and its expanded version — a drop down calendar.

Let's list all the components of the calendar.

  1. Area
  2. Buttons for switching to previous and following months
  3. Combo box control with a list of months
  4. Fields to enter a year
  5. Array of text labels with abbreviations of days of the week
  6. Separation line
  7. Two-dimensional array of text labels with dates
  8. Button to quickly jump to the next date

 

Fig. 1. Components of the calendar.

Author: Anatoli Kazharski

 
As I look through the eleventh article in the series, I think: My God, how much stupid (but certainly useful!) work this man is doing! It's all already written 25 thousand times, debugged, and ready-made. Why can't we port ready libraries? EH, MQ?
 
Andrey Khatimlianskii:
... It's all already written 25 thousand times, debugged and ready-made. Well, why can't you port ready-made libraries? HUH, MQ?
Where can I see the sources of libraries that can be ported? )
 
Anatoli Kazharski:
Where can I see sources of libraries that can be ported? )

You have to look for it, I haven't come across it.

But I'm sure such basic things can't be not implemented.

Appliers, who will share a link?

Or am I naive?

 
Andrey Khatimlianskii:

You have to look for it, I haven't come across it.

But I'm sure such basic things can't be unimplemented.

Appliers, who will share a link?

Or am I naive?

You write"It's all already written 25 thousand times, debugged, and lies ready-made. "
 
pako:
You write"It's all been written 25,000 times, debugged, and is lying around ready to go. "

I do.

In my opinion, such codes must exist.

 
Andrey Khatimlianskii:

Writing.

The way I see it, there should be such codes.

That's what he wrote, to have them.
 
Andrey Khatimlianskii:

Writing.

In my opinion, such codes must exist.

Show me a finger where these codes have been written 25 thousand times, debugged and are lying in ready form
 

We'll work with what we've made ourselves for now. ;)

//---

On topic. There are alternative versions of calendars:

1. In the standard library in the directory:

  • <data directory>\MQL5\Include\Controls\DatePicker.mqh
  • <data directory>\MQL5\Include\Controls\DateDropList.mqh
For some reason, there is still no description or even a sign of these fileson the site in the help.

2. In Dmitry's library: CCalendarInputBox - library for MetaTrader 5 >>>>

//---

1. The plus of the variant from the standard library is that it is fully drawn. It is a single graphical object.

2. The plus in Dmitriy's variant is that there is a possibility to choose time.

//---

The nearest task is to add these advantages to the calendar presented in the article.

 
pako:
Can you show me where these codes have been written 25 thousand times, debugged and are ready to use?

I had to search for 20 minutes...

Search in google - the first result - the first link from the table, which specifies the GPL licence - a link to download the archive with sources.

 
Andrey Khatimlianskii:

I had to search for 20 minutes.

Search in google - the first result - the first link from the table, which specifies the GPL licence - a link to download the archive with sources.

Do you realise what it is to port gui libraries based on Qt or X11? Plus the interrelationships of these libraries are just extravagant. It's easier to port a mini-linkus distribution to MetaTrader. Why? Let it be.