Libraries: EasyAndFastGUI library for creating graphical interfaces - page 21

 
In the Element.mqh file in the CElement constructor, replace the values of m_font and m_font_size.
And how to do the same without editing the library?
 
o-dima:
In Element.mqh file in CElement constructor replace m_font and m_font_size values.
And how to do the same without modifying the library?

And what is the problem for each element to specify these values when creating it?

 
Irrational if there are a hundred elements.
 

Hey together,

I tried this source, it worked. Really great work, thank you!

I tried to adapt it to my needs and it didn't worked. After hours of debugging i found it:

When the filename of the ExampleEA.mq5 is longer than 14 characters, than during the creation of the combobox, the function ResourceCreate() inside the Canvas class fails with error 4016 (resource not found).

Is this behaviour known? Since i don't know the exact circumstances leading to this error i try to find out how to prevent such errors.



Update: I found a corresponding discussion with a quick solution here.

Lib 'EasyAndFastGUI': Creating Canvas fails with error 4016 after update build 2265
Lib 'EasyAndFastGUI': Creating Canvas fails with error 4016 after update build 2265
  • 2019.12.14
  • www.mql5.com
Hi guys, the following error occurs (which did not before releasing build 2265) when I create GUI elements with the EasyAndFastGUI library (https...
 
OMG. It's complex but advanced and the UI design looks nice! GREAT!
 
2021.01.18 17:57:52.598 MacdSampleCFrames (Si-3.21,M2)  CElement::CreateCanvas > Не удалось создать холст для рисования элемента (CButton): 4016
2021.01.18 17:57:52.598 MacdSampleCFrames (Si-3.21,M2)  CProgram::OnTesterInitEvent > Could not create the GUI!

After one of the updates, the buffer for the global terminal variable string was reduced and it has been generating a critical error for some time now.

It can be cured by a quick hack without digging into the code, just by renaming the Expert Advisor startup file, shortening its name

for example from MacdSampleCFrames.ex5 to just Macd.ex5.

 

How can I set text label parameters of   Anchor(ANCHOR_RIGHT)?

Is bug! ?

 

Gustavo Enedir Hennemann:
Hello,
I didn't get it. What to do?

Replace from m_main to  CElementBase:: where the warning appears.

 
Why doesn't the CElement class write methods to modify object properties (such as font, size, colour, background colour, etc.) instead of using the default properties. This is very unfriendly to programming
 

Hi @Mikhail Sergeev, @Paulo Campello!

Guys,

I have reduced number of warnings from 18 down to 6.

And those 6 boil down to 4 following types of problems. Can you pls advise how to properly correct them?

1. How do I correctly replace it with "CElementBase::"?

//--- Определим цвет для линии
   color clr=m_back_color;
   if(m_tabs.GetButtonPointer(m_selected_tab).IsLocked()) // this one!
      clr=m_tabs.GetButtonPointer(m_selected_tab).BackColorLocked();
//--- Рисуем линию
   m_canvas.Line(x1,y1,x2,y2,::ColorToARGB(clr,m_alpha));
  }


2. And here - when I replace "el." with "CElementBase::" - there is a new compilation error saying "IsAvailable - access to non-static member of function" - how do you solve it correctly?

      for(int e=0; e<elements_total; e++)
        {
         //--- Проверяем только доступные элементы
         CElement *el=m_wnd[m_active_window_index].m_elements[e];
         if(!el.IsVisible() || !el.IsAvailable() || el.IsLocked())
            continue;
         //--- Обработка события в обработчике элемента
         el.OnEvent(m_id,m_lparam,m_dparam,m_sparam);
        }


3. Same line: when I replace "el.IsLocked()" with "CElementBase::IsLocked" : error "IsLocked - access to non-static member of function"

4. What to replace "m_windows[0].IsLocked()" with?

//--- Выйти, если интерфейс не создан
   if(windows_total<1)
      return;
//--- Изменить размер всех элементов заблокированной формы, если включен один из режимов
   if(m_windows[0].IsLocked() && (m_windows[0].AutoXResizeMode() || m_windows[0].AutoXResizeMode()))
     {

Pls, help! It would be great to use this library. But we need to solve these few things first.

Thank you!