B4J Question ColorPicker question

Toley

Active Member
Licensed User
Longtime User
Hi everyone I have some questions about ColorPicker View of the B4J internal designer.

1- Do the opacity slider can be disable? My app don't support this feature.

2- I noticed that the ColorPicker use the system language (french Canadian in my case). Can I force it to be english?

3- This one is most likely to be impossible but I ask anyway. Can I change the resolution of colors. Like to be 16bits or even 8bits?

Thank you.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. No. However when you get the color value you can force the alpha level to be FF:
B4X:
Sub ColorPicker1_ValueChanged (Value As Paint)
   Dim clr As Paint = fx.Colors.From32Bit(Bit.Or(0xFF000000, fx.Colors.To32Bit(Value)))
   CSSUtils.SetBackgroundColor(MainForm.RootPane, clr)
End Sub

2. Add this code at the beginning of the program:
B4X:
Dim jo As JavaObject
jo.InitializeStatic("java.util.Locale")
jo.RunMethod("setDefault", Array(jo.GetField("ENGLISH")))

3. It is not possible.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…