Mashiane Expert Licensed User Longtime User Aug 27, 2015 #1 Hi I want to get and set the color of a ColorPicker using my crud db app. The color picker returns a Paint object. How do I get the returned color as a string/int and also be able to set it when I read the saved color from a db? This post so far I have been able to get the RBG, perfect! Now setting the color is the issue. Any help please.
Hi I want to get and set the color of a ColorPicker using my crud db app. The color picker returns a Paint object. How do I get the returned color as a string/int and also be able to set it when I read the saved color from a db? This post so far I have been able to get the RBG, perfect! Now setting the color is the issue. Any help please.
Erel B4X founder Staff member Licensed User Longtime User Aug 27, 2015 #2 You can convert a color to int with fx.Colors.To32Bit. Later you can convert it to a paint with fx.Colors.From32bit. Upvote 0
You can convert a color to int with fx.Colors.To32Bit. Later you can convert it to a paint with fx.Colors.From32bit.
G goomoo Member Licensed User Longtime User Nov 7, 2021 #3 Erel said: You can convert a color to int with fx.Colors.To32Bit. Later you can convert it to a paint with fx.Colors.From32bit. Click to expand... What is fx, please? Upvote 0
Erel said: You can convert a color to int with fx.Colors.To32Bit. Later you can convert it to a paint with fx.Colors.From32bit. Click to expand... What is fx, please?
EnriqueGonzalez Expert Licensed User Longtime User Nov 7, 2021 #4 goomoo said: What is fx, please? Click to expand... FX is a module that comes with ui projects. Look for it on global variables in main. If it is not there then you are not in a ui app Upvote 0
goomoo said: What is fx, please? Click to expand... FX is a module that comes with ui projects. Look for it on global variables in main. If it is not there then you are not in a ui app
EnriqueGonzalez Expert Licensed User Longtime User Nov 7, 2021 #5 And this thread is old, if you are in a ui app then it's better to use xui Upvote 0
G goomoo Member Licensed User Longtime User Nov 7, 2021 #6 EnriqueGonzalez said: And this thread is old, if you are in a ui app then it's better to use xui Click to expand... How to convert Color to int using xui? Please give an example. Upvote 0
EnriqueGonzalez said: And this thread is old, if you are in a ui app then it's better to use xui Click to expand... How to convert Color to int using xui? Please give an example.
G goomoo Member Licensed User Longtime User Nov 7, 2021 #8 EnriqueGonzalez said: B4A - XUI Click to expand... I've already looked for B4A-XUi. I can't find it. Can You write an example? Upvote 0
EnriqueGonzalez said: B4A - XUI Click to expand... I've already looked for B4A-XUi. I can't find it. Can You write an example?
EnriqueGonzalez Expert Licensed User Longtime User Nov 7, 2021 #9 Code: Copy Dim p As Paint = fx.Colors.Black Dim i As Int = xui.PaintOrColorToColor(p) Log(i) Upvote 0
G goomoo Member Licensed User Longtime User Nov 7, 2021 #10 EnriqueGonzalez said: Code: Copy Dim p As Paint = fx.Colors.Black Dim i As Int = xui.PaintOrColorToColor(p) Log(i) Click to expand... Which brings me back to my previous question, where did this FX come from? Upvote 0
EnriqueGonzalez said: Code: Copy Dim p As Paint = fx.Colors.Black Dim i As Int = xui.PaintOrColorToColor(p) Log(i) Click to expand... Which brings me back to my previous question, where did this FX come from?
EnriqueGonzalez Expert Licensed User Longtime User Nov 7, 2021 #11 Code: Copy Sub Process_Globals Private fx As JFX if you can't find it there, then you are not using an UI project Upvote 0
Code: Copy Sub Process_Globals Private fx As JFX if you can't find it there, then you are not using an UI project
G goomoo Member Licensed User Longtime User Nov 7, 2021 #12 EnriqueGonzalez said: Code: Copy Sub Process_Globals Private fx As JFX if you can't find it there, then you are not using an UI project Click to expand... OK! Upvote 0
EnriqueGonzalez said: Code: Copy Sub Process_Globals Private fx As JFX if you can't find it there, then you are not using an UI project Click to expand... OK!