Page 1 of 1
ColorRequester
Posted: Sat Apr 10, 2004 4:29 pm
by Switchblade
Hi,
how can I divide the Results of RGB by 120 to set a String Text with the result ?
Code: Select all
Result = Blue(Color)
...
..
.
setgadgettext (2, ?
the structure of the result in the string-gadget-text must be somethin like this :
2,3456/1,3455/0,345
(RGB)
Posted: Sat Apr 10, 2004 8:46 pm
by Switchblade
thx for the help
but ive found it out by my self
Posted: Sat Apr 10, 2004 10:26 pm
by freak
Don't get mad, just because you don't get an answer within 4 hours... this is a forum, not a chat.
btw: i didn't say something because i didn't really understand what your problem was.
Timo
Posted: Sun Apr 11, 2004 10:05 am
by Froggerprogger
Do you want to divide the result by 120 and display it in the stringgadget ?
Then you should divide the result by 120 and display it in the stringgadget.
Code: Select all
Result = Blue(Color)
divBlue.f = Result / 120
Setgadgettext(2, StrF(divBlue, 4))
Posted: Sun Apr 11, 2004 6:51 pm
by Switchblade
thats my version
Code: Select all
Result1 = Red(Color)
Result2 = Green(Color)
Result3 = Blue(Color)
SetGadgetText(2, ""+ StrF(Result1/255)+"/"+StrF(Result2/255)+"/"+StrF(Result3/255))