Download MetaTrader 5
To add comments, please log in or register
Have you installed MetaTrader 5? Find out more about it!
trader88888
131
trader88888 2016.04.25 13:48 

Hello,

 Is it possible to add in color transparency to an object?  Eg.  I want to take a rectangle and instead of making it while #ffffff i wanted to make it transparent.  

 

I was wondering if anyone can show me some example code to do this?

 

Thank you 

Alain Verleyen
Moderator
28551
Alain Verleyen 2016.04.25 15:00  
trader88888:

Hello,

 Is it possible to add in color transparency to an object?  Eg.  I want to take a rectangle and instead of making it while #ffffff i wanted to make it transparent.  

 

I was wondering if anyone can show me some example code to do this?

 

Thank you 

All is explained on this article.
trader88888
131
trader88888 2016.04.25 16:34  
Thank you, very helpful and didn't find that.  Since this example is in mql5 i imagine this isn't possible on mql4?
Alain Verleyen
Moderator
28551
Alain Verleyen 2016.04.25 17:22  
trader88888:
Thank you, very helpful and didn't find that.  Since this example is in mql5 i imagine this isn't possible on mql4?
It should be similar if not the same, I didn't check.
Fernando Carreiro
1451
Fernando Carreiro 2016.04.25 17:24  
trader88888:
Thank you, very helpful and didn't find that.  Since this example is in mql5 i imagine this isn't possible on mql4?

Since "angevoyageur" is also a moderator, if he has recommended the article to you, then it is because it is also relevant to MQL4+ (even if it is geared for MQL5).

Why don't you simply try out a few examples and find-out for yourself?

Currently MetaQuotes is slowly merging the two platforms into one, so learning the MQL5 way of doing things is only going to benefit you in the long run.

Карпутов Владимир
203
Карпутов Владимир 2016.04.25 17:56  
Hello.
I am here only on the personal request of angevoyageur.
Transparent object may be, if you use canvas. All scripts from my articles (of canvas) work in MQL4. And the General Council: it is time to work on MQL5:).
I've gone back to "5" Forum.
Doerk Hilger
1073
Doerk Hilger 2016.04.25 18:41  
angevoyageur:
It should be similar if not the same, I didn't check.
Yes, totally the same.
Gatesby
41
Gatesby 2016.10.10 09:03  
Doerk:
Yes, totally the same.

How did you do it?

I just refer the link and read the article. Use definition of transparent  C'0,0,0'/ 0x000000  as the visual effect which I want, but no transparent effect at all?

My compiling platform MetaQuotes 4  Version : 4.00 Build 1010    18 Aug 2016

Pls give me some adivce or hints! Thanks in advance!   

//+------------------------------------------------------------------+
//| Account Statistics function                    |
//+------------------------------------------------------------------+
bool AccountInfo()
{  
   if(Set_Hide)
   {
      if(!RectLabelCreate(0,"Statistics",0,xRec,yRec,xRec_size,yRec_size,0x000000,
            BORDER_FLAT,CORNER_LEFT_UPPER,clrWhite,STYLE_SOLID,1,false,false,false,1))
       {
           string Err=GetLastError();
           Print("Error creating Rectangle Label. Error code ",Err,". ",ErrorDescription(Err));
       } 
       Set_Hide = false; 
   }
}
RectangleLable Transparent Effect Failed

 

/
To add comments, please log in or register