I haven't tested in the tester at all yet, as there were a lot of restrictions there before. That's why it's temporarily like this for now.
Have you already tried testing the GUI in the tester? What is the result? Do events work? Are all graphical objects displayed?
Yes, all objects are displayed, mouse events on charts won't work in the tester, but so the whole interface is alive, and actually it was like that before
In general, I'll probably give up the inbuilt timer for now, so as not to edit the library ))
I can not figure out how to make the form was created a certain size on X and was bound to the right border of the chart, ie, when you change the size of the chart on X, the form would not change the size would move to the right / left without changing its size.
As an option to override the ChartEventChartChange method in the CWndEvents class, this method is in the private section, maybe it makes sense to move the methods:
Move to the protected section, but again, methods from the private section are also used there? In general, if anyone has encountered such a problem, please suggest a solution
I can not figure out how to make the form was created a certain size on X and was bound to the right border of the chart, ie, when you change the size of the chart on X, the form would not change the size would move to the right / left without changing its size.
As an option to override the ChartEventChartChange method in the CWndEvents class, this method is in the private section, maybe it makes sense to move the methods:
Move to the protected section, but again, methods from the private section are also used there? In general, if anyone has encountered such a problem, please suggest a solution
Approximately like this:
//+------------------------------------------------------------------+//|| Creates a form for the controls |//+------------------------------------------------------------------+bool CProgram::CreateWindow(conststring caption_text)
{
//--- Add the window pointer to the window array
CWndContainer::AddWindow(m_window);
//--- Dimensionsint x_size =200;
int y_size =200;
//--- Coordinatesint x =m_chart.WidthInPixels()-(x_size+1);int y =1;
//--- Properties
...
//--- Form creationif(!m_window.CreateWindow(m_chart_id,m_subwin,caption_text,x,y))
return(false);
//---return(true);
}
//---
In the event handler of the MQL-application user class when processing the CHARTEVENT_CHART_CHANGE event:
You can also add a check if the size (width) of the chart window has changed, because the CHARTEVENT_CHART_CHANGE event is generated in different cases. For example, when scrolling the chart.
In the event handler of a custom MQL application class when processing a CHARTEVENT_CHART_CHANGE event:
//---
Result:
//---
You can also add a check if the size (width) of the chart window has changed, because the CHARTEVENT_CHART_CHANGE event is generated in different cases. For example, when scrolling the chart.
How to get in the table the index of the row on which the left mouse button was clicked, if SelectableRow(false) was set when creating the table? Parsing the sparam parameter in OnEvent does not look elegant. Of course it is possible to use SelectableRow(true) and use SelectedItem(), but the task is without selecting rows in the table.
How to get in the table the index of the row on which the left mouse button was clicked, if SelectableRow(false) was set when creating the table? Parsing the sparam parameter in OnEvent doesn't look elegant. Of course, we can use SelectableRow(true) and use SelectedItem(), but the task is without selecting rows in the table.
So far only like this, but I will add this feature.
How to differentiate between the event of selecting a row in a table and selecting an item in a combo box? From the code I can see that they use the same ON_CLICK_LIST_ITEM event.
Konstantin: How to differentiate between the event of selecting a row in a table and selecting an item in a combo box? From the code it is clear that they use the same ON_CLICK_LIST_ITEM event.
Why? What exactly is preventing you from doing this?
I display a table in a form, select a row in it, select a value in a combo-box and the data from the table row and the value from the combo-box should be written to a separate entity. Now the events are not delimited and it is necessary to make crutches that would realise the task:
maybe you can suggest some other mechanism?
Basically, the table is an array of ticker pairs, the combo-box contains types of signals, a separate entity is the objects of the array of signals. The objects themselves are not a single field, but complex custom data types, a pair of tickers from the table and a signal type are recorded in them, and then another processing is done.
By the way, there's a problem:
The highlighted string does not allow to work in the tester.I haven't tested in the tester at all yet, as there were a lot of restrictions there before. So temporarily so far.
Have you already tried to test the GUI in the tester? What is the result? Do events work? Are all graphical objects displayed?
I haven't tested in the tester at all yet, as there were a lot of restrictions there before. That's why it's temporarily like this for now.
Have you already tried testing the GUI in the tester? What is the result? Do events work? Are all graphical objects displayed?
Yes, all objects are displayed, mouse events on charts won't work in the tester, but so the whole interface is alive, and actually it was like that before
In general, I'll probably give up the inbuilt timer for now, so as not to edit the library ))
I can not figure out how to make the form was created a certain size on X and was bound to the right border of the chart, ie, when you change the size of the chart on X, the form would not change the size would move to the right / left without changing its size.
As an option to override the ChartEventChartChange method in the CWndEvents class, this method is in the private section, maybe it makes sense to move the methods:
Move to the protected section, but again, methods from the private section are also used there? In general, if anyone has encountered such a problem, please suggest a solution
I can not figure out how to make the form was created a certain size on X and was bound to the right border of the chart, ie, when you change the size of the chart on X, the form would not change the size would move to the right / left without changing its size.
As an option to override the ChartEventChartChange method in the CWndEvents class, this method is in the private section, maybe it makes sense to move the methods:
Move to the protected section, but again, methods from the private section are also used there? In general, if anyone has encountered such a problem, please suggest a solution
Approximately like this:
//---
In the event handler of the MQL-application user class when processing the CHARTEVENT_CHART_CHANGE event:
//---
Result:
//---
You can also add a check if the size (width) of the chart window has changed, because the CHARTEVENT_CHART_CHANGE event is generated in different cases. For example, when scrolling the chart.
It goes something like this:
//---
In the event handler of a custom MQL application class when processing a CHARTEVENT_CHART_CHANGE event:
//---
Result:
//---
You can also add a check if the size (width) of the chart window has changed, because the CHARTEVENT_CHART_CHANGE event is generated in different cases. For example, when scrolling the chart.
oops, it worked ))
How to get in the table the index of the row on which the left mouse button was clicked, if SelectableRow(false) was set when creating the table? Parsing the sparam parameter in OnEvent does not look elegant. Of course it is possible to use SelectableRow(true) and use SelectedItem(), but the task is without selecting rows in the table.
How to get in the table the index of the row on which the left mouse button was clicked, if SelectableRow(false) was set when creating the table? Parsing the sparam parameter in OnEvent doesn't look elegant. Of course, we can use SelectableRow(true) and use SelectedItem(), but the task is without selecting rows in the table.
How to differentiate between the event of selecting a row in a table and selecting an item in a combo box? From the code it is clear that they use the same ON_CLICK_LIST_ITEM event.
I display a table in a form, select a row in it, select a value in a combo-box and the data from the table row and the value from the combo-box should be written to a separate entity. Now the events are not delimited and it is necessary to make crutches that would realise the task:
maybe you can suggest some other mechanism?
Basically, the table is an array of ticker pairs, the combo-box contains types of signals, a separate entity is the objects of the array of signals. The objects themselves are not a single field, but complex custom data types, a pair of tickers from the table and a signal type are recorded in them, and then another processing is done.