Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 20 in printed book and digital formats -- plus a one-year subscription (beginning with 21.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Recent issues

Article Preview

Buy Now

Issue 3.6



Issue: 3.6 (July/August 2005)
Author: Greg Fiumara
Article Description: No description available.
Article Length (in bytes): 4,002
Starting Page Number: 9
Article Number: 3604
Related Web Link(s):


Full text of article...

In the development of a layout for any particular application, organization is key. It is important to keep interface elements organized in a way that users are not confused or lost in a sea of controls. If disorganization is achieved, potential customers may become frustrated and leave your application. Some ways of organizing and grouping interface elements are through drawer windows, tab panels, or the often-neglected group box. DarkWorks Software has released a great example called SmartGroupBox, which demonstrates how to utilize the group box, along with its companion the disclosure triangle, to their full potential.

By definition, disclosure means to expose or reveal. That is precisely what the disclosure triangle was created to do. SmartGroupBox takes this concept one step further. By toggling the value of a disclosure triangle, the contents of the group box and the group box itself are shown or hidden. The interface elements either appear or disappear.

A great feature of SmartGroupBox is that it successfully interacts with other SmartGroupBoxes in the same window, without the addition of any additional code, by adjusting element placement in the window. It does this by adjusting the top property of all the controls based on the height and top properties of currently "shown" group boxes. This feature is very helpful in successfully utilizing "smart" group boxes. This is much better illustrated at runtime rather than written in a review.

Simply place any type of control within the constraints of a group box. In addition, the disclosure triangle must also be in the group box. Change the superclass of the triangle and the group box to that of the named classes included in the free SmartGroupBox download. That's it. SmartGroupBox has one of the simplest setups of a development tool. No code needs to be applied to make this tool work. It is simply a drag-and-drop installation.

One obvious feature lacking from this example is a way to automatically resize the window hosting the group box. When a group box and its accompanying controls are hidden, the space is replaced with a vacant area of Aqua stripes. This absence should be replaced with a way to resize the host window to allow for minimum amounts of wasted screen real estate, similar to that of a preference window from a Cocoa application.

The code SmartGroupBox uses is short, sweet, and to the point. Although there are no code comments or manuals, even newcomers to the programming scene should be able to easily identify what is going on in the few lines of code necessary to create this sample.

As always, in order to keep a customer using an application, the customer must feel at home with the application. The best way to do this is to provide the customer with a clean interface that promotes productivity. SmartGroupBox by DarkWorks Software helps bring an interface utopia one step closer to reality.

End of article.