Article Preview
Buy Now
| Print: | |
| PDF: |
Beginner's Corner
Dynamic Windows and Controls
Exposing and hiding controls with dynamic manipulation
Issue: 5.3 (March/April 2007)
Author: Marc Zeedar
Article Description: No description available.
Article Length (in bytes): 17,580
Starting Page Number: 34
RBD Number: 5312
Resource File(s):
5312.sit Updated: Thursday, March 15, 2007 at 9:02 AM
5312.zip Updated: Thursday, March 15, 2007 at 9:02 AM
Related Link(s): None
Known Limitations: 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.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|










