Discussion of article "Graphical Interfaces X: Time control, List of checkboxes control and table sorting (build 6)" - page 3
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I mean on the site in the article - maybe there the old one was added to the updates. I take the file from the latest update, downloaded from the site from the bottom of the article from the zip.
Here, made the corrections as I wrote above:
Oh, good. Otherwise you might have something nailed down there, as has happened many times. ) But I'll keep it in mind.
You're forcing me to do something stupid.
Small, but you can see.
And you could just load it yourself, and look inside - it's easy, especially since you were told about it.
You're forcing me to do something stupid.
It's small, but you can see it.
You could have just downloaded it yourself and looked inside, it's easy, especially since you were told about it.
I didn't ask you for any proof. I just said I'll keep it in mind. But I haven't reproduced it yet. I'll keep it in mind.
If there's a problem, your fix may not work for all cases. It works for your case, but you need to test all modes there. I will do it myself if I find a problem.
Really, don't do nonsense. )
I didn't ask you for any proof. I just said I'd keep it in mind. But I haven't reproduced it yet. I'll keep it in mind.
If there's a problem, your fix may not work for all cases. It works for your case, but you need to test all modes there. I will do it myself if I find a problem.
Really, don't do nonsense. )
Okay, I won't ;)
Tol, question: tables are sorted by columns - everything is normal. But ..., if the table has empty rows, and there are many of them, then sorting includes these empty rows too. It turns out that, let's say there is a table with a thousand rows (1001 - zero for the header) - according to the maximum number of characters in the market overview. But at the moment there are only 10 characters in the market overview. They are all in the table in its first ten rows - from the first to the tenth. The rest of the rows are empty (tables are not dynamic, and symbols can be added/removed to/from the table). If you try to sort such a table, the sorted list goes to the very end of the table - to rows 990 - 1000 (zero - the header), and you can see empty rows at the top. This is not good and, as I think, an omission.
... tables are not dynamic, and characters can be added/removed to/from the table...
Soon to be dynamic. I'm in the middle of it right now.
... And the problem with including completely empty rows in the sorted list? What about it?
It'll stay that way for now. I'm not going back to sorting anytime soon.
...
Same thing with the separating line in the context menu in ContextMenu.mqh - the separating bar between menu items is not on its coordinates.
In the method:
//| Creates a dividing line|
//+------------------------------------------------------------------+
bool CContextMenu::CreateSeparateLine(const int line_number,const int x,const int y)
{
//--- Save the form pointer
m_sep_line[line_number].WindowPointer(m_wnd);
//--- Set properties
m_sep_line[line_number].TypeSepLine(H_SEP_LINE);
m_sep_line[line_number].DarkColor(m_sepline_dark_color);
m_sep_line[line_number].LightColor(m_sepline_light_color);
m_sep_line[line_number].AnchorRightWindowSide(m_anchor_right_window_side);
m_sep_line[line_number].AnchorBottomWindowSide(m_anchor_bottom_window_side);
//--- Creating a dividing line
if(!m_sep_line[line_number].CreateSeparateLine(m_chart_id,m_subwin,line_number,x,y,m_x_size-10,2))
return(false);
//--- Save the object pointer
CElement::AddToArray(m_sep_line[line_number].Object(0));
return(true);
}
//+------------------------------------------------------------------+
replaced the highlighted with
//| Creates a dividing line|
//+------------------------------------------------------------------+
bool CContextMenu::CreateSeparateLine(const int line_number,const int x,const int y)
{
//--- Save the form pointer
m_sep_line[line_number].WindowPointer(m_wnd);
//--- Set properties
m_sep_line[line_number].TypeSepLine(H_SEP_LINE);
m_sep_line[line_number].DarkColor(m_sepline_dark_color);
m_sep_line[line_number].LightColor(m_sepline_light_color);
m_sep_line[line_number].AnchorRightWindowSide(m_anchor_right_window_side);
m_sep_line[line_number].AnchorBottomWindowSide(m_anchor_bottom_window_side);
//--- Creating a dividing line
if(!m_sep_line[line_number].CreateSeparateLine(m_chart_id,m_subwin,line_number,x-m_wnd.X(),y-m_wnd.Y(),m_x_size-10,2))
return(false);
//--- Save the object pointer
CElement::AddToArray(m_sep_line[line_number].Object(0));
return(true);
}
//+------------------------------------------------------------------+
and the separator bar is in its place.
The same with the separating line in the context menu in ContextMenu.mqh - the separating line between menu items is not on its coordinates.
I have reproduced all such cases. This applies to all items that are used as components in other items. It is detected when the initial absolute coordinates of the form, when creating the GUI, are greater than (1,1).
The fix will be in the next build. As a temporary quick fix, either (1) your examples or (2) just initially set the form in coordinates (1,1) will work. The second one is better, as it may sprinkle in other modes of element positioning.