FutureBasic Logo

<<    Index    >> FutureBasic

ColorWell   statement / function

Statement syntax
colorwell tag, enabled, color, rect, style, wndTag

Function syntax
color = colorwell(tag)

The colorwell statement puts a new colorwell in the current output window, or alters an existing colorwell's characteristics. The colorwell function returns the well's color as a ColorRef and is equivalent to calling fn ColorWellColor.

tag A number (1 through 1000000) that you assign when you create the colorwell and that you refer to when altering the colorwell. The number you assign must be different from the tag value of all other existing widgets in the current window. A negative tag hides the colorwell.
enabled A boolean value which specifies whether the colorwell should be enabled or disabled.
color The initial color to be displayed in the colorwell.
rect The colorwell's enclosing rectangle. This can be specified in either of two ways:
(i) (x,y,w,h) where x,y are the origin and w,h the size of the colorwell.
(ii) A CGRect value
style The style of the colorwell (macOS 13.0+).
NSColorWellStyleDefault (default)
wndTag An optional parameter for when the colorwell's window is not the current output window. Note specifying this parameter does not bring the window to the front or make it the output window.
Dialog events
_colorWellPulldown - this event is used to override the default behavior of minimal and expanded style colorwells. To enable this event, call ColorWellEnablePulldownAction after creating the colorwell.

Apple documentation