Change the control colors of an Ellipse

Hello, I’m trying to change the color of an ?Ellipse control in a window, but I don’t understand which prop to use. Can anyone give me a tip?
I’m trying to:

execute popup('fill|background|Selected|Color')
    ?ELLIPSETubo{prop:fillColor} = color:red
    ?ELLIPSETubo{prop:background}= COLOR:Blue
    ?ELLIPSETubo{prop:SelectedColor}= COLOR:Blue
    ?ELLIPSETubo{prop:Color}= COLOR:Blue
END
display()

Thank you

Have you tried PROP:Fill?

1 Like

Solved… Thank you very much!!!
If I do:

     ?ELLIPSETubo{prop:Fill} = COLOR:yellow

BUT…

How to pass colors through a variable?
Like:

execute popup('red|blue|green|yellow|gray')
  loc:Color = 'red'
  loc:Color = 'COLOR:Blue'
  loc:Color = 'COLOR:green'
  loc:Color = 'COLOR:yellow'
  loc:Color = 'COLOR:gray'
End
?ELLIPSETubo{prop:Fill}= loc:Color
Display

That didn’t work…

1 Like

loc:Color = COLOR:Red ! Assuming loc:Color is LONG

1 Like

Perfect…!
Thanks…!

The Clarion Help is worth a read first. You would see it notes the FILL() color is set with PROP:Fill. Almost always the Help shows the PROP: for an Attribute.

The Border Line around the Ellipse can be set with COLOR() which is set with PROP:Color.

I mention this because if you look at PROPERTY.CLW you’ll see that PROP:FillColor is an old alias that is the same as PROP:Color and :Background. So PROP:FillColor was setting your Broder Line color. At the default Line Width of 1 its does not jump out.

PROP:Fill           EQUATE(7C61H)  ! integer, COLORnone if none

PROP:Color          EQUATE(7CFAH)  ! array[integer]: up to three components (see below)
PROP:Background     EQUATE(7CFAH)  ! integer: For compatibility
PROP:FillColor      EQUATE(7CFAH)  ! integer: = PROP:Color[1]  single value, COLORnone if none

Covering everything Ellipse (and Box) you can have Gradient Colors like below a Horizontal Cylinder type from Red to Yellow:

2 Likes

Thanks again for the class!