Add a Color Property (to a Module)

This defined Property (in a Module):

Gaves me this error:

What is wrong ?

I removed the Default value and this removes the error for this entry, the other 5 entries, see below, returns an error one at a compile time (after I remove the Default value)

I changed to RGB(0,0,0,0) and Black, but still get an error…

I read the documentation Adding properties

and Property

but I found no clue.

The compiler is telling you the problem:
A constant was expected here, but this is some other kind of expression.

You can’t use RGB. You must you &c.

1 Like

RGB(0,0,0) is a function, try &c000000 instead

1 Like

Thank you guys for your answer…

Weird that Xojo does not know its own Language…

One day, I will write a Book and I will name it “Xojo is simple”, it will have 128 volumes… :japanese_ogre:

PS: pasting text in the Property name is nice. Not been able to get all the text is less than nice. Try with:

gCol_Shadow_Black As Color = &c000000 Private
gCol_Shadow_Black As Color = &c000000 // Default is Black

In the first line, Private stays with the Default value.
In the second line, the comment is stripped… (instead of falling in the comments area)