SmartColorWell 1.2.1

by Harry Hooie
http://www.harryhooie.com/source/


What is it ?

SmartColorWell is a cross-platform open-source ColorWell class for REALbasic 4.5 or greater. The SmartColorWell control stores a color value and displays that color in a simulated BevelButton that when pressed allows the user to change the color using the operation system's standard color picker. SmartColorWell is developed for and tested on Linux, Mac OS 9, Mac OS X, and Windows 98/2000/XP. SmartColorWell isn't really all that smart, but it's pretty smart relative to other REALbasic ColorWell classes.


How much is it ?

The SmartColorWell class is provided free for all to use. You are free to redistribute the source code. If you distribute it as a standalone class, please include this documentation with it. If you distribute source code containing SmartColorWell, you do not need to include this documentation. There is no need to credit me in your program for using SmartColorWell unless you just want to.

If you make any code improvements, you are welcome to submit them, and I will try to incorporate them in the next update so that everyone using SmartColorWell can benefit.


Using SmartColorWell:

First add the SmartColorWell class to your project by dragging the "SmartColorWell.rbo" file into your project window. To add a SmartColorWell to one of your project windows, add a canvas to the window and change the canvas's Super property from "Canvas" to "SmartColorWell". (or simply drag the SmartColorWell class from your Project window and drop it in the window)


Preferential treatment:

The easiest way to save the SmartColorWell's color to restore later, such as with preferences, is to save the SmartColorWell's getColorAsHexString function value:

s = SmartColorWell1.getColorAsHexString ' dim as string

Restore the SmartColorWell's color using setColorFromHexString (see Setting SmartColorWell properties for more details):

SmartColorWell1.setColorFromHexString = s ' as string


Setting SmartColorWell properties:

--- Using the IDE "Properties" window ---

--- Using Code ---


Revision History:

Version 1.2.1

Version 1.2

Version 1.1


Legal mumbo jumbo 
SmartColorWell is provided "as is" without warranty of any kind, either expressed or implied. The entire risk arising out of use or performance of SmartColorWell remains with you. While the SmartColorWell source code itself may not be sold or distributed for profit, the SmartColorWell source code MAY be included with other software, services, publications, or products which are sold or distributed for profit as long as this documentation is included with it. Harry doesn't mind if he doesn't make the scene. He's got a daytime job, he's doing alright.