[futurebasic] Re: [FB] ColorPicker's "original" box

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 1999 : Group Archive : Group : All Groups

From: AlStaff@...
Date: Mon, 3 May 1999 09:04:36 EDT
<< The colorPicker function in the handbook (p.316) works fine, but how in the
world do you get your current color into the "original" box? >>


One of the parameters is for the color coming in. Here's a small demo.


DIM gMyColor.6
gMyColor.blue = 2000
gMyColor.green = 25000
gMyColor.red = 30000
END GLOBALS

LOCAL FN colorPicker
 DIM colorin.6                                    ' needed for color to start 
with
 DIM spot.4                                       ' needed for Color Picker 
coodinates
 colorin.blue = gMyColor.blue                     ' RGB color to start with
 colorin.green = gMyColor.green
 colorin.red = gMyColor.red
 spot.h = 100                                     ' coordinates for Color 
Picker window
 spot.v = 50
 pick = FN GETCOLOR (spot, "pick a color", colorin, gMyColor)
END FN

WINDOW 1
FOR X = 1 TO 2     ' loops twice to show color picked is used with color 
picker
 FN colorPicker
 CLS
 PRINT "Color picked is:"
 CALL MOVETO(150,5)
 CALL PENSIZE (1,12)
 CALL RGBFORECOLOR (gMyColor)
 CALL LINETO (250,5)
 PRINT
 COLOR _zBlack
 PRINT "Blue: " gMyColor.blue
 PRINT "Green: " gMyColor.green
 PRINT "Red: " gMyColor.red
 PRINT "Preess RETURN to continue."
 INPUT X$
NEXT X



Al Staffieri Jr.

AlStaff@...
http://members.aol.com/AlStaff/index.html