Using Bitmap Label object as Edit,TEXT or LABEL object.

 
Hello every one,
How I can create a bitmap label but use at as an Edit box or Lebel text object. I noticed that, some products use bitmap label instead of EDIT, BUTTON and LABEL objects and it help to speed up in MT5. But I don't know how to do that, is there anyone who can suggest any ideas for that?
For example, the text on a bitmap label on the chart can change constantly, but as far a I know bitmap label is a picture, so how is possible to change the text of a bitmap label object constantly??
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types
  • www.mql5.com
Object Types - Objects Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Fatemeh Ameri:
Hello every one,
How I can create a bitmap label but use at as an Edit box or Lebel text object. I noticed that, some products use bitmap label instead of EDIT, BUTTON and LABEL objects and it help to speed up in MT5. But I don't know how to do that, is there anyone who can suggest any ideas for that?
For example, the text on a bitmap label on the chart can change constantly, but as far a I know bitmap label is a picture, so how is possible to change the text of a bitmap label object constantly??

they are probably tracking keyboard input 

 
Lorentzos Roussos #:

they are probably tracking keyboard input 

What does that mean? It has nothing to do with keyboard. For example a bitmap label can show profit of the current position and profit is changing constantly.
 
Fatemeh Ameri #:
What does that mean? It has nothing to do with keyboard. For example a bitmap label can show profit of the current position and profit is changing constantly.

To use the bitmap as an edit (input)

 
Fatemeh Ameri:
Hello every one,
How I can create a bitmap label but use at as an Edit box or Lebel text object. I noticed that, some products use bitmap label instead of EDIT, BUTTON and LABEL objects and it help to speed up in MT5.

How do you know that ?

 
Alain Verleyen #:

How do you know that ?

Know what?
 

if you mean to display text instead of using edits or labels then you'd place a canvas with the drawn background (which you render once) and another one above it where you constantly update the text.

Don't overdo it thought , 44ms is the human eye refresh rate , ballpark

 
Fatemeh Ameri #:
Know what?

" some products use bitmap label instead of EDIT "

How do you know that ?

 
Alain Verleyen #:

" some products use bitmap label instead of EDIT "

How do you know that ?

You can check all objects present on the chart. When all of the objects are bitmap label while it has some edit box we can conclude it.
 
Alain Verleyen #:

" some products use bitmap label instead of EDIT "

How do you know that ?

More important than that is how to create a bitmap label which shows a text and can change constantly on the chart.
 

you create an array of pixels 

,1 dimensional width * height (uint)

and you fill it with text with this :

TextOut - Object Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5

then you create a resource with this :(the 2nd version to which you send the array)

ResourceCreate - Common Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5

and then you send the resource name to the OBJ_BMP_FILE property of the bitmap object

The text get size function can help you gauge the size the text will occupy with the current settings which can change with (the) Text set font 

You can create your own CSS essentially

EDTI : When you specify the name of the OBJ_BMP_FILE property with the resource name you also add a :: prefix to the string 
Reason: