Bug? [Solved] Beta 4.2 CustomView Colors

stevel05

Expert
Licensed User
Longtime User
If I create a customview with two color properties:

B4X:
#DesignerProperty: Key: ChordColour, DisplayName: Chord Colour, FieldType: Color, DefaultValue: 0x00000000, Description: Select a colour for the chord dots
#DesignerProperty: Key: TextColour, DisplayName: Text Colour, FieldType: Color, DefaultValue: 0x00000000, Description: Select a colour for the text

Then in the designer change the color only using the picker, the colour is shown as #00FF0000 and is not applied to the property, nor does the color indicator box change.

If I then type a color name in the designer e.g. Red, the color shows as #FFFF0000. From then on any color selected is applied correctly.

Also the defaults don't seem to be applied, I tried as #00000000 and 0x00000000 (as the example shows both)

Edit: OK Sussed it. The first two digits are Alpha, so should be #FF000000 then the picker is working correctly
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is not a bug.

The color is applied (always remember to create a new view to check the defaults):
SS-2016-01-25_15.20.28.png


The Alpha level is not changed when you change the color through the color spectrum.
SS-2016-01-25_15.21.09.png


You need to manually change the A level or to select a color from the colors list. This is how it works with all colors.

The solution is to not use 0x00... as the default unless you want a transparent color.
 

stevel05

Expert
Licensed User
Longtime User
Thanks Erel, that just dawned on me.
 
Top