Discussion of article "Graphical Interfaces X: Text selection in the Multiline Text box (build 13)" - page 14

 
Konstantin:

In the method of class CTabs:

should be added highlighted, it is a check for null array, because without this check, in case of absence of tabs, the whole form crashes with an error.

It is not clear how you created an element of CTabs type if there is a check in the method of creating tabs:

...
//--- If there are no tabs in the group, report it
   if(TabsTotal()<1)
     {
      ::Print(__FUNCTION__," > This method must be called, "
              "when there is at least one tab in the group! Use the CTabs::AddTab() method");
      return(false);
     }
...

 
Anatoli Kazharski:

I don't understand how you created an element of CTabs type, if there is a check in the method of tabs creation:

It was created without any problems, I did not fiddle with class sources except for the highlighted one, I used classes without overriding, i.e. I did not give additional functionality, everything works in dynamics, tabs are added and removed when the number of tabs increases or decreases.

sometimes the above message pops up when the number of tabs == 0, but everything works without problems.

but if you don't add the selected one, then for example, when changing the size of the main form, the robot crashes with an error.
 
Konstantin:

It was created without problems, I didn't fiddle with class sources except for the highlighted one, I used classes without overriding, i.e. I didn't give additional functionality, everything works in dynamics, tabs are added and removed when the value of the number of tabs increases and decreases

sometimes the above message pops up when the number of tabs == 0, but everything works without problems.

but if you don't add the selected one, for example, when you resize the main form, the robot crashes with an error.

Ok, I will look in detail after the next version is published. There will be significant changes that will allow to develop the library even faster and easier.
 
Anatoli Kazharski:

Ok, I will look in detail after the next version is published. There will be significant changes that will allow to develop the library even faster and easier.

I hope the structure of the library will not change?

Will all of you make the changes you wrote about above?

There is one point that I do not like, the library is tied to the catalogue with drawings, it would be better to put this catalogue inside the catalogue of the library, then it could be placed anywhere, for example, working with git you have to change everything in at least two places.

 
Konstantin:

1. I hope the structure of the library will not be changed?

2. will all of you make the changes that were written above?

3. There is one point that I do not like, the library is tied to the catalogue with pictures, it would be better to put this catalogue inside the catalogue of the library, then it could be placed anywhere, for example, working with git you have to change everything in at least two places.

1. I think that for the user of the library will not be noticeable. All changes and additions will be described in detail in the article.

2. Some. Not all at once.

3. For controls I think could be moved. The custom ones will of course stay there as well.

 

Could you tell me how to implement work with objects of CStandardChart class on chart compression by mouse, with the help of price scale, i.e. vertically as in a usual chart of the terminal?

As far as I understand, there is no implementation of these mouse events in the library and you need to implement them yourself. In any case, I've never done this before, so I'm waiting for hints )).
Использование аналитических объектов - Графики котировок, технический и фундаментальный анализ - Справка по MetaTrader 5
Использование аналитических объектов - Графики котировок, технический и фундаментальный анализ - Справка по MetaTrader 5
  • www.metatrader5.com
Определение трендов, построение каналов, выявление циклов и уровней поддержки/сопротивления — все эти и многие другие задачи решаются при помощи...
 
Konstantin:

Can you tell me how to implement the work with objects of class CStandardChart on compression of the chart by mouse, using the price scale, i.e. vertically as in a regular chart of the terminal?

As far as I understand, there is no implementation of these mouse events in the library and you need to implement them yourself. In any case, I've never done this before, so I'm waiting for hints )).

I haven't tried it this way, so I can't give you a hint.

I can only suggest this variant:

Clicks on chart objects generate an event with the identifier ON_CLICK_SUB_CHART. The string parameter(sparam) contains the name of the character in the chart object. Accept the message with this identifier in the event handler of the user class, set the symbol from the message in the chart window and use its ready functionality.

 
Anatoli Kazharski:

I haven't tried it that way, so I can't advise you.

I can only suggest this variant:

Clicks on chart objects generate an event with the identifier ON_CLICK_SUB_CHART. The string parameter(sparam) contains the name of the character in the chart object. Accept the message with this identifier in the event handler of the user class, set the symbol from the message in the chart window and use its ready functionality.

it will not work on OBJ_CHART objects ((

When applying operations with charts for the Chart object (OBJ_CHART), the following restrictions apply:

  • you cannot close with ChartClose();
  • you cannot change the symbol/period using ChartSetSymbolPeriod() function;
  • properties CHART_SCALE, CHART_BRING_TO_TOP, CHART_SHOW_DATE_SCALE and CHART_SHOW_PRICE_SCALE (ENUM_CHART_PROPERTY_INTEGER) do not work.
 
Konstantin:

it will not be possible to realise this on OBJ_CHART objects ((

So the variant I suggested is relevant. )
 
Anatoli Kazharski:
So the option I suggested is relevant. )

not relevant, but not feasible, this functionality is not enabled for these objects by MQ developers.