Article Preview
Buy Now
COLUMN
Dynamic Windows and Controls
Exposing and hiding controls with dynamic manipulation
Issue: 5.3 (March/April 2007)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 22,087
Starting Page Number: 34
Article Number: 5312
Resource File(s):
5312.zip Updated: 2007-03-15 08:24:17
Related Link(s): None
Excerpt of article text...
A frequent programmer dilemma is deciding between keeping interfaces simple and uncluttered for novice users and offering options for advanced users. A common solution is to offer a simple toggle switch that expands the "simple" view to include additional options for more adventurous users. When I first got into programming with REALbasic I wanted to implement a feature like this, but I was mystified at how to accomplish it. I figured there was some kind secret involved. It turns out there isn't -- it's just simple window manipulation.
For example, imagine we've got a window with a few simple controls at the top (see Figure 1). The lower half consists of more complicated controls that only advanced users would need. In between these two areas of the window we put a divider and a disclosure control. The idea is that when the disclosure control is clicked the advanced controls are displayed. When the disclosure control is collapsed, the advanced options are hidden (see Figure 2).
While this sounds complicated, especially to beginning programmers, it turns out it is frightfully easy. All you have to do is change the height of the window!
...End of Excerpt. Please purchase the magazine to read the full article.