Download MetaTrader 5

Discussion of article "Graphical Interfaces V: The List View Element (Chapter 2)"

To add comments, please log in or register
Download documentation as one file. It is easy!
MetaQuotes Software Corp.
Moderator
181161
MetaQuotes Software Corp. 2016.05.17 10:50 

New article Graphical Interfaces V: The List View Element (Chapter 2) has been published:

In the previous chapter, we wrote classes for creating vertical and horizontal scrollbars. In this chapter, we will implement them. We will write a class for creating the list view element, a compound part of which will be a vertical scrollbar.

The element of the graphical interface list view gives the user a choice of several options. The total number of the list view items and the number of items in its visible part can differ when the total number is too big and does not fit the highlighted working part of the interface. In such cases a scrollbar is used. 

We will compose a list view of several primitive objects and an include element. They are:

  1. List view background.
  2. Array of the list view items.
  3. The vertical scrollbar control.



Fig. 1. Compound parts of the list view element.

 

Author: Anatoli Kazharski

marquez
123
marquez 2016.05.23 15:13  
MetaQuotes Software Corp.:

New article Graphical Interfaces V: The List View Element (Chapter 2) has been published:

Author: Anatoli Kazharski

Hi,


compiling it with current MT5 Version: 5.00 build 1340 causes compiler Errors:

'return' - cannot convert from const pointer to nonconst pointer    SplitButton.mqh    90    65
'return' - cannot convert from const pointer to nonconst pointer    ListView.mqh    67    76

Anatoli Kazharski
56904
Anatoli Kazharski 2016.05.24 17:04  
marquez:

Hi,

compiling it with current MT5 Version: 5.00 build 1340 causes compiler Errors:

'return' - cannot convert from const pointer to nonconst pointer    SplitButton.mqh    90    65
'return' - cannot convert from const pointer to nonconst pointer    ListView.mqh    67    76

Thank.

Форум по трейдингу, автоматическим торговым системам и тестированию торговых стратегий

Обсуждение статьи "Графические интерфейсы III: Группы простых и многофункциональных кнопок (Глава 2)"

Anatoli Kazharski, 2016.05.14 18:58

Да, после последнего обновления терминала появилась такая ошибка. Правила "игры" немного изменились. Исправить можно просто удалив спецификатор const.

Перейдите к строке с ошибкой и замените эту строку:

CContextMenu     *GetContextMenuPointer(void)        const { return(::GetPointer(m_drop_menu)); }

На эту: 

CContextMenu     *GetContextMenuPointer(void)              { return(::GetPointer(m_drop_menu)); }

//---

Подобные исправления нужно будет внести во всех файлах, где будет встречаться такая ошибка. В следующих статьях серии ошибка будет устранена.

Спасибо за сообщение. 


Amir Yacoby
1192
Amir Yacoby 2016.05.24 22:49  
The comments in the source are in Gibberish (previous times it was in English)
To add comments, please log in or register