I haven't tested the library for dynamic object creation, so I can't advise you right now.
I thought so :)
For simple objects I wrote this:
//+------------------------------------------------------------------+//|| Removes a pointer from the array of elements |//+------------------------------------------------------------------+void CWndContainer::DeleteElementsFromArray(constint window_index,constint id)
{
int windows_total=::ArraySize(m_windows);
//--- If there are no forms for controls in the databaseif(windows_total<1)
{
::Print(__FUNCTION__," > There is no one form.");
return;
}
//--- If the request is for a non-existent formif(window_index>=windows_total)
{
::Print(PREVENTING_OUT_OF_RANGE," window_index: ",window_index,"; windows total: ",windows_total);
return;
}
//--- Remove elements from the common array
DeleteElement(id,m_wnd[window_index].m_elements);
//--- Remove the main elements from the array
DeleteElement(id,m_wnd[window_index].m_main_elements);
//---
DeleteElement(id,m_wnd[window_index].m_timer_elements);
//---
DeleteElement(id,m_wnd[window_index].m_available_elements);
//---
DeleteElement(id,m_wnd[window_index].m_auto_x_resize_elements);
//---
DeleteElement(id,m_wnd[window_index].m_auto_y_resize_elements);
}
//+------------------------------------------------------------------+//|| Removes a pointer from the array of elements |//+------------------------------------------------------------------+template<typename T>
void CWndContainer::DeleteElement(constint id,T &array[])
{
bool del=false;
for(int i=0;i<ArraySize(array);i++)
{
if(del)
{
if(i==ArraySize(array)-1) break;
array[i] = array[i+1];
continue;
}
if(array[i].Id()==id)
{
del=true;
if(i==ArraySize(array)-1) break;
array[i] = array[i+1];
}
}
if(del) ArrayResize(array,ArraySize(array)-1,RESERVE_SIZE_ARRAY);
}
//+------------------------------------------------------------------+
MT4 Version.
Experts\Article09\TestLibrary03
The Edit is always flickering.
Anatoli Kazharski Please help to solve this bug.
https://www.mql5.com/en/forum/274301
Good afternoon.
Bigger problem :)
Create a dynamic object, for example a label
...
I haven't tested the library for dynamic object creation, so I can't give you any advice now.
Another example of an application whose GUI is created using this library:
MT4 Version.
Unfortunately I can not help now, because it no longer worked for MT4. This version of the library has been tested only on the MT5.
Форум по трейдингу, автоматическим торговым системам и тестированию торговых стратегий
Библиотеки: EasyAndFastGUI - библиотека для создания графических интерфейсов
Anatoli Kazharski, 2018.08.24 10:09
Ещё один пример приложения, GUI которого создано с помощью этой библиотеки:
I haven't tested the library for dynamic object creation, so I can't advise you right now.
I thought so :)
For simple objects I wrote this:
Can you tell me, in the table the button with a picture is added only to the first column, and in the rest does not work.
Is it a bug or not?
In the table, the button with a picture is added only to the first column, and in the rest does not work.
You can add to all of them.
You can add to everything.
Thanks, I figured it out.
But strangely, if the alignment in the cell is set to centre or right, the picture is not visible.
If the alignment is left, it works fine.
Thank you, I've got it.
But strangely, if the alignment in the cell is set to centre or right edge, the picture is not visible.
If it is on the left edge, it works fine.
Yes, now there is such a restriction (only left edge).