Mac and Linux Color Selector in REALbasic line

Mac OS and Linux and Windows offers a great Color Selector tool where we can select a color in various ways, we can save them as favorites etc. This tutorial will show you how can we integrate system built-in Color Selector tool into our REALbasic application. Watch it, learn it, enjoy it!

Creating the GUI

Drag and drop to Window a Rectangle Control.

Mac Color Selector in REALbasic

Displaying system Color Selector

Go to code editor and in Rectangle1 Function MouseDown () enter this code. Now when the user selects a color it will be automatically in our Rectangle Control.

1
2
3
4
5
6
Dim b as Boolean
Dim c as Color
 
c = Rectangle1.FillColor
b = SelectColor(c, "Select a Color")  // displays the color selector
Rectangle1.FillColor = c

Author: Jakub Pawlak

I'm interested in all. Currently working on the development of TUTSPOLIS and I hope that in near feature the project will be successful.

2 Responses to “Mac and Linux Color Selector in REALbasic”

  1. Bill says:

    This works on Windows too…at least on XP. :)

  2. Jakub Pawlak says:

    Thx for testing Bill :D I didn’t know that Windows has got something like Color Selector.

Leave a Reply

Copyrights (c) TUTSPOLIS | Powered by Wordpress MU | Inspired at Elegant Themes designed by qbap (HTML5 & CSS3)