The Interface Designer
Fade to Black
Using window transparency to add an extra touch of class
Issue: 7.1 (November/December 2008)
Author: Toby Rush
Article Description: No description available.
Article Length (in bytes): 7,565
Starting Page Number: 46
RBD Number: 7118
project7118.zip Updated: Saturday, November 1, 2008 at 11:57 AM
Related Web Link(s):
Known Limitations: None
Excerpt of article text...
In this column, we're going to figure out how to implement a little eye candy used by Adobe's latest programs, among others: the subtle fades used to show and hide palettes when the application is activated or sent into the background.
Deconstructing this process shows us that it is actually a simple thing; the effect of "fading out" is produced by quickly lowering the transparency of the palette window until the window is completely invisible. While this is not a difficult concept to understand, the implementation in REALbasic is just a little tricky.
Making Things Clear
Now, when we think about what the term "window" meant before computers came along, it doesn't seem like transparency should be too difficult, but in fact, REALbasic does not have any built-in control for window transparency (or, more properly, translucency). For that, we need to turn to the Mac OS X toolbox. Fortunately, the toolbox call is not a difficult one: it's located in the Carbon Window Manager, and it's called SetWindowAlpha.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.