Special

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 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.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!

Article Preview


Buy Now

Issue 7.1

COLUMN

Containing Controls

Creating groups of controls for easy reuse

Issue: 7.1 (November/December 2008)
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): 14,718
Starting Page Number: 38
Article Number: 7114
Resource File(s):

Download Icon project7114.zip Updated: 2008-11-01 11:53:48

Related Link(s): None

Excerpt of article text...

Being able to reuse code is one of the key precepts of object-oriented programming. It's great to be able to create a subclass of a control like an EditField, for example, and have it do nifty new things right out of the box so you can just drag it to a window to instantly enable all sorts of custom behavior without a single line of new code.

But what if your control is more complicated? Today's modern interfaces often require controls with multiple parts, like a custom canvas linked to scrollbars. That makes easy reuse difficult since you have to move multiple things and keep them linked together. Wouldn't it be great if there was a way to group controls into one new control?

Well there is! That's called a ContainerControl. You may not be aware of it or have used it, in part because it's a feature of the Professional Edition. As many beginners use the Standard Edition of REALbasic, I normally hesitate writing about professional-only features, but ContainerControls are so useful and powerful I feel it's a topic worth exploring. Only you can decide if it's a feature worth upgrading to use.

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