Today I started to use this library, build from 2019.03.13 16:43 (I think build 16). So, I'm using it to create tables, it's working almost perfectly, I used as reference the articles:
https://www.mql5.com/en/articles/2500#para6
https://www.mql5.com/en/articles/2897#para7
For me is important to have the sorting feature, so, I use the library acording to instructions on article "X". If I use that build (build 6) the table works very well, but if I use the last build (build 16), the table do not sorts the elements when I click on the header cells.
Investigating the main differences, I got this in the file Table.mqh.
This is in the build 6:
void CTable::SortData(constuint column_index=0)
{
...
//--- Store the index of the last sorted data column
m_is_sorted_column_index=(int)column_index;
//--- Sorting
QuickSort(first_index,last_index,column_index,m_last_sort_direction);
//--- Update the table
UpdateTable();
//--- Set the icon according to the sorting direction
m_sort_arrow.State((m_last_sort_direction==SORT_ASCEND)? true : false);
}
This is in the build 16:
void CTable::SortData(constuint column_index=0,constint direction=WRONG_VALUE)
{
...
//--- Запомним индекс последнего отсортированного столбца данных
m_is_sorted_column_index=(int)column_index;
//--- Сортировка
QuickSort(first_index,last_index,column_index,m_last_sort_direction);
}
In the new build there is no "Update" method, so, I think this is the reason to not sorting.
Thus, I made this change and it apparently worked:
void CTable::SortData(constuint column_index=0,constint direction=WRONG_VALUE)
{
...
//--- Запомним индекс последнего отсортированного столбца данных
m_is_sorted_column_index=(int)column_index;
//--- Сортировка
QuickSort(first_index,last_index,column_index,m_last_sort_direction);
//--- Update the table
Update(true);
}
The first article Graphical Interfaces I: Preparation of the Library Structure (Chapter 1) explains in detail what this library is for. You will find a list of articles with links at the end of each chapter. There, you can also download a complete version of the library at the current stage of development. The files must be placed in the same...
If I build ExampleEAF from the library as an indicator in MT4, the indicator crashes with an error when I try to drag the window on the chart
It works fine in MT5
array out of range in 'WndEvents.mqh' (288,72)
If I add a check for range overrun in the first cycle, then dragging works.
void CWndEvents::CheckElementsEvents(void)
{
//--- Handling the mouse cursor movement eventif(m_id==CHARTEVENT_MOUSE_MOVE)
{
//--- Exit if the form is in another subwindow of the chartif(!m_windows[m_active_window_index].CheckSubwindowNumber())
return;
//--- Check only available itemsint available_elements_total=CWndContainer::AvailableElementsTotal(m_active_window_index);
for(int e=0; e<available_elements_total; e++)
{
// !!! Additional checkif (e >= ArraySize(m_wnd[m_active_window_index].m_available_elements)) continue;
CElement *el=m_wnd[m_active_window_index].m_available_elements[e];
//--- Checking focus over elements
el.CheckMouseFocus();
//--- Event Handling
el.OnEvent(m_id,m_lparam,m_dparam,m_sparam);
}
}
//--- All events except mouse cursor movementelse
{
int elements_total=CWndContainer::ElementsTotal(m_active_window_index);
for(int e=0; e<elements_total; e++)
{
//--- Check only available items
CElement *el=m_wnd[m_active_window_index].m_elements[e];
if(!el.IsVisible() || !el.IsAvailable() || el.IsLocked())
continue;
//--- Event handling in the item handler
el.OnEvent(m_id,m_lparam,m_dparam,m_sparam);
}
}
//--- Directing the event to the application file
OnEvent(m_id,m_lparam,m_dparam,m_sparam);
}
but "expanding" the window to the whole chart area and returning back stops working.
Can you tell me how to fix this problem so that it works normally in MT4 too?
What is the difference? No warning during compilation in MT4, I don't know what direction to dig in.
Also in MT4 when compiling as an indicator focus switching does not work in the sense that if you open a dropdown list and click somewhere aside, the list does not close and the input focus does not switch to another element, in Expert mode it works normally.
In MT5 both Expert Advisor and indicator work normally
Could you please tell me how to change the default font of a programme (Expert Advisor) using this library? It is the one that prints everything starting from the title in the programme header. At least change the size (increase).
Today I started to use this library, build from 2019.03.13 16:43 (I think build 16). So, I'm using it to create tables, it's working almost perfectly, I used as reference the articles:
https://www.mql5.com/en/articles/2500#para6
https://www.mql5.com/en/articles/2897#para7
For me is important to have the sorting feature, so, I use the library acording to instructions on article "X". If I use that build (build 6) the table works very well, but if I use the last build (build 16), the table do not sorts the elements when I click on the header cells.
Investigating the main differences, I got this in the file Table.mqh.
This is in the build 6:
This is in the build 16:
In the new build there is no "Update" method, so, I think this is the reason to not sorting.
Thus, I made this change and it apparently worked:
PS.: comments in russian doesn't help too much.
Where is Label Class in the Library ? How to create a single Label ?
Say Gustavo! Beauty?
I was racking my brains here too to make the graph chart sort work and I got it by chance ...
It is necessary to have the table updated in the ON_SORT_DATA event of your "program.mqh", something like:
Hope this helps!
Here it worked perfect !!!
T +
Raul
This is an English language forum. Please only post in English.
Use the site's translation tool if necessary.
When posting code use the code button (Alt +S).
I have edited your post this time.
If I build ExampleEAF from the library as an indicator in MT4, the indicator crashes with an error when I try to drag the window on the chart
It works fine in MT5
If I add a check for range overrun in the first cycle, then dragging works.
but "expanding" the window to the whole chart area and returning back stops working.
Can you tell me how to fix this problem so that it works normally in MT4 too?
What is the difference? No warning during compilation in MT4, I don't know what direction to dig in.
Also in MT4 when compiling as an indicator focus switching does not work in the sense that if you open a dropdown list and click somewhere aside, the list does not close and the input focus does not switch to another element, in Expert mode it works normally.
In MT5 both Expert Advisor and indicator work normally
Another interesting glitch with tables.
After several inputs characters start to double and then triple (see gif).
What could be the problem?
CreateTextEdit doesn't seem to support Chinese input?
CreateTextEdit doesn't seem to support Chinese input?
Hi
Where can I download the MT4 version of this library?