Border Color Rectangle / Button

To add comments, please log in or register
syrvn 0
134
syrvn 0  

Hi!


the following code draws a rectangle. However, the border color seems to have no effect for object rectangle:

ObjectCreate(0,HR_UP,OBJ_RECTANGLE,0,TimeCurrent(),RL,TimeCurrent(),SL);
   ObjectSetInteger(0,HR_UP,OBJPROP_FILL,true);
   ObjectSetInteger(0,HR_UP,OBJPROP_BACK,true);
   ObjectSetInteger(0,HR_UP,OBJPROP_COLOR,CCC.COLOR_GRAY_2);
   ObjectSetInteger(0,HR_UP,OBJPROP_BORDER_TYPE,BORDER_FLAT);
   ObjectSetInteger(0,HR_UP,OBJPROP_BORDER_COLOR,CCC.COLOR_GREEN_1);
   ObjectSetInteger(0,HR_UP,OBJPROP_STYLE,STYLE_SOLID);

When I Change OBJ_RECTANGLE to OBJ_BUTTON, the border color appears. So I wouldn mind using OBJ_BUTTON. However, as I can see, OBJ_BUTTON can only be used with X- and Y-Position and not with TimeCurrent();

Any comments appreciated! Best!

Anthony Garot
1843
Anthony Garot  
syrvn 0:

Hi!


the following code draws a rectangle. However, the border color seems to have no effect for object rectangle:

When I Change OBJ_RECTANGLE to OBJ_BUTTON, the border color appears. So I wouldn mind using OBJ_BUTTON. However, as I can see, OBJ_BUTTON can only be used with X- and Y-Position and not with TimeCurrent();

Any comments appreciated! Best!

Draw a second rectangle on top of the first with a different color, a wider width, fill=false, and back=false.

syrvn 0
134
syrvn 0  

Hi, thanks for getting back to me. I thought of that solution too but it is somehow a dirty hack, isnt it? ;-) 

To add comments, please log in or register