2019r3 / rectangle / FillColor not working?

Hello Community,

I am using the following code to change a color from a rectangle based on changed values from a slider

If ColorChange = 1 then
  if RectangleColor1.FillColor = Color.LightGray then
    gColor1TempDice = -1
    gColorTempCalc = 0
  end if
  RectangleColor1.FillColor = Color.Black
  gColor1 = 1
end if

The code above worked with 2019r2.1.
With 2019r3 I got

ViewColor.SliderColor1.ValueChanged, line 5
Undefined operator. Type ColorGroup does not define "=" with type Color
if RectangleColor1.FillColor = Color.LightGray then

I guess it has something to do with changes made for dark mode. I checked the documentation but could not find a hint about this.

Is this a bug or do I have to change the code?

Best regards

–Christian

Colors properties in 2019r3 were changed into ColorGroup objects to facilitate iOS dark mode. That said, I believe we should be able to make this work. Could you file a bug report?

You could also create a ColorGroup with black on both sides, compare against that and it would probably work just fine.

Hello Greg,

thank you for your answer.

I have created feedback (https://xojo.com/issue/58740)>]58740

Is it documented how to create a ColorGroup? If yes I can test it.

Regards

–Christian

You can add them to your project using the Insert menu or you can create them in code.

Var c as new ColorGroup(Color.Black)