Special

Clearance Sale!

We've been publishing for over five years now and it's time to clear out our inventory of back issues, so we're slashing prices!

RBD Magazines

Check out this amazing clearance sale of all our past issues. Missing some issues? This is a great time to complete your RBD collection. Save up to 40% off the regular price of our printed back issue packages. These prices are only good until the end of the year May 2008 and supplies are limited, so place your order today.

Article Preview


Buy Now

Print:
PDF:

Feature

Pop-up Palettes

Learn to create a pop-up color selection palette

Issue: 2.5 (May/June 2004)
Author: Thomas Reed
Author Bio: Thomas Reed has been programming as a hobbyist for more than 20 years, and fell in love with the Mac in 1984.
Article Description: No description available.
Article Length (in bytes): 9,529
Starting Page Number: 30
RBD Number: 2514
Resource File(s):

Download Icon 2514.sit Updated: Friday, May 14, 2004 at 10:00 AM

Related Link(s): None
Known Limitations: None

Excerpt of article text...

A pop-up palette is similar to a pop-up menu, and usually consists of a grid of graphical items from which the user can select. Such palettes have been found in many applications over the years. One popular example is a palette of paint tool options that appears when you click a tool in a paint program. I have seen many different implementations of the pop-up palette in REALbasic, but many fall short of expectations. In this article, I will show you how to create a very dynamic palette.

Some approaches to the pop-up palette draw the palette within a control in the window containing the initiating control. This approach has a number of serious limitations, with control order issues, handling of clicks outside the palette, and available window space being the most significant. For these reasons, I prefer to implement pop-up palettes as a separate window.

Let's think for a moment about how the palette should look and behave. Although I recommended creating the palette as a window, it is immediately obvious that the palette should not have a title bar. A floating palette with a title bar is a perfectly acceptable object, but that is not what we are trying to achieve. Thus, we must set the window's frame to type "4 - Plain Box". This eliminates as much of the window's interface as possible, with the only part of the window outside the content region being a one pixel wide black line around the edge.

...End of Excerpt. Please purchase the magazine to read the full article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com