Special

Special Print Closeout!

We're clearing out the remainder of our print issues at fire sale prices -- as much as 75% off! Quantities are extremely limited and only available while supplies last. Hurry to take advantage of this one-time offer.

RBD Magazines

Once these printed back issues are gone, they are gone!

Article Preview


Buy Now

PDF:

Beginner's Corner

Containing Controls

Creating groups of controls for easy reuse

Issue: 7.1 (November/December 2008)
Author: Marc Zeedar editor-at-rbdeveloper.com
Article Description: No description available.
Article Length (in bytes): 9,985
Starting Page Number: 38
RBD Number: 7114
Resource File(s):

Download Icon project7114.zip Updated: Saturday, November 1, 2008 at 11:57 AM

Related Link(s): None
Known Limitations: 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.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com