Download MetaTrader 5

Discussion of article "Graphical Interfaces III: Simple and Multi-Functional Buttons (Chapter 1)"

To add comments, please log in or register
Write your articles using our editor. It is convenient!
MetaQuotes Software Corp.
Moderator
181359
MetaQuotes Software Corp. 2016.03.31 16:25 

New article Graphical Interfaces III: Simple and Multi-Functional Buttons (Chapter 1) has been published:

Let us consider the button control. We will discuss examples of several classes for creating a simple button, buttons with extended functionality (icon button and split button) and interconnected buttons (button groups and radio button). Added to that, we will introduce some additions to existing classes for controls to broaden their capability.

Here, we are going to consider the button control.

Button is the simplest control in the graphical interface that a user can interact with. At the same time, there can be several implementation options. In this article, we are going to create three classes for creating buttons of different levels of complexity.

  • Simple button. The CSimpleButton class.
  • Icon button. The CIconButton class.
  • Split button. The CSplitButton class.

Adding to that, we will implement other three classes for creating groups of interconnected buttons.

  • Group of simple buttons. The CButtonsGroup class.
  • Group of icon buttons. The CIconButtonsGroup class.
  • Group of radio buttons. The CRadioButtons class.

We will also introduce additions for enriching functionality of the context menu with one more mode. The CWindow form class will receive one more field with a method which will allow to define exactly which control blocked the form at the moment of its activation. This will allow to create conditions when the form can be unblocked only by the control that blocked it.

After compiling the files and loading the test EA on to the chart, you should see the result as shown in the screenshot below:

Fig. 4. Test of the icon button control.

Author: Anatoli Kazharski

To add comments, please log in or register