Discussion of article "Graphical Interfaces VII: the Tables Controls (Chapter 1)" - page 2

[Deleted]  
Anatoli Kazharski:

Download the latest version of the library from this article: Graphical Interfaces X: Updates to Drawn Table and Code Optimisation (build 10)

Great! Thanks a lot!
[Deleted]  
Anatoli Kazharski:

Download the latest version of the library from this article: Graphical Interfaces X: Updates for Drawn Table and Code Optimisation (build 10)


Good afternoon!!!

The code reads fine, but I can't find where the size of the text displayed in the table rows is changed

There is no mention of Font_Size in Program.mqh. Is it somewhere in the libraries?

 
nkaretnikov:


Good afternoon!

The code reads fine, but I can't find where to change the size of the text displayed in the table rows

There is no mention of Font_Size in Program.mqh. Is it somewhere in the libraries?


The methods for setting the font and font size are in the base element class:

//+------------------------------------------------------------------+
//| The base class of the control element|
//+------------------------------------------------------------------+
class CElementBase
  {
protected:
   //--- Font
   string            m_font;
   int               m_font_size;
   //---
public:
   //--- (1) Font and (2) font size
   void              Font(const string font)                         { m_font=font;                          }
   string            Font(void)                                const { return(m_font);                       }
   void              FontSize(const int font_size)                   { m_font_size=font_size;                }
   int               FontSize(void)                            const { return(m_font_size);                  }
  };
[Deleted]  
Anatoli Kazharski:


The methods for setting the font and font size are in the base element class:

//+------------------------------------------------------------------+
//| The base class of the control element|
//+------------------------------------------------------------------+
class CElementBase
  {
protected:
   //--- Font
   string            m_font;
   int               m_font_size;
   //---
public:
   //--- (1) Font and (2) font size
   void              Font(const string font)                         { m_font=font;                          }
   string            Font(void)                                const { return(m_font);                       }
   void              FontSize(const int font_size)                   { m_font_size=font_size;                }
   int               FontSize(void)                            const { return(m_font_size);                  }
  };


It's been a while since I picked up a checker :)

All I had to do was add m_canvas_table.FontSize

Thanks!

 
Is there any possibility to add rows to the table? For example, when a new order is opened, add information about it as a row to the table. Maybe the table can be deleted m_table.Delete(), and then create again with a new number of rows ?.....(I have not succeeded).
 
traderEvgen:
Is there any possibility to add rows to the table? For example, when a new order is opened, add information about it as a row to the table. Maybe you can delete the table with m_table.Delete() and then create it again with a new number of rows ?.....(I have not succeeded).

Check out the examples in these articles:

GUI X: Advanced List and Table Management. Code Optimisation (build 7)

GUI X: Sorting, table reconstruction and cell controls (build 11)

 

yes, I've seen it. But it's for mql5, I need mql4 too
 
traderEvgen:

Yeah, I've seen it. But it is for mql5, I still need mql4

The library works under MT4. Small changes, and does not differ from MT5 except for some purely MT5-features like objects-graphics and other goodies.

Tables work exactly the same in MT4 as in MT5

 
Artyom Trishkin:

The library works under MT4. Small changes, and does not differ from MT5 except for some purely MT5-features like objects-graphics and other goodies.

Tables work exactly the same in MT4 as in MT5.

how to fix it ?

1



123

 
traderEvgen:

How do I fix it?




Some errors follow from others. You need to fix the whole library together.