Do you really expect an answer? There are no mind readers here and our crystal balls are cracked, so we can't see your machine.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problem
We can't see your broken code.
Always post all relevant code (using Code button) or attach the source file.
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked, so we can't see your machine.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problem
We can't see your broken code.
Always post all relevant code (using Code button) or attach the source file.
Sorry I forgot to add it. No need to be sarcastic. :)
Here is the code:
int rectangleWidth = 200; int rectangleHeight = 220; int rectangleColor = clrBlue; int rectangleCorner = CORNER_LEFT_UPPER; string rectName = "InfoBackground"; ObjectCreate(0, rectName, OBJ_RECTANGLE_LABEL, 0, 0, 0); ObjectSet(rectName, OBJPROP_XDISTANCE, 10); ObjectSet(rectName, OBJPROP_YDISTANCE, 20); ObjectSet(rectName, OBJPROP_XSIZE, rectangleWidth); ObjectSet(rectName, OBJPROP_YSIZE, rectangleHeight); ObjectSet(rectName, OBJPROP_COLOR, rectangleColor); ObjectSet(rectName, OBJPROP_CORNER, rectangleCorner); ObjectSetInteger(0, rectName, OBJPROP_SELECTABLE, false); ObjectSetInteger(0, rectName, OBJPROP_SELECTED, false); ObjectSetInteger(0, rectName, OBJPROP_SELECTED, true); ObjectSetInteger(0, rectName, OBJPROP_SELECTED, false);
¿Realmente esperas una respuesta? Aquí no hay lectores de mentes y nuestras bolas de cristal están rotas, por lo que no podemos ver su máquina. Cómo hacer preguntas de forma inteligente . (20 04 ) Sea preciso e informativo sobre su problema
No podemos ver su código roto.
Publique siempre todo el código relevante (usando el botón Código ) o adjunte el archivo fuente.
Try OBJPROP_BGCOLOR
Man, that did the trick! :O Much appreciated!
Then I tried to add the following code to the background (with the Z value 1) and for text objects with the Z value 2 (should bring the text forward), but it has no effect. The background still covers the text. The text objects are currently created before the background rectangle, and I tried this both ways, but nothing changed.
ObjectSetInteger(0, rectName, OBJPROP_ZORDER, 1);
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I see EA's that have a nice rectangle as the information text background, works nicely for them.
However, I can't do that with MQL4 scripting. It just doesn't work, I have tried everything that I thought of, googled around as well. My rectangle always comes white, no matter what color I give it. Secondly, it always covers the text objects, it seems impossible to create a background rectangle.
Can anyone shed some light on this weird mystery?