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 5.1


Dynamic Controls

Mastering Arrays of Controls

Issue: 5.1 (September/October 2006)
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): 18,870
Starting Page Number: 36
Article Number: 5114
Resource File(s):

Download Icon 5114.zip Updated: 2006-09-28 14:13:56

Related Link(s): None

Excerpt of article text...

The other day I created an application with a dynamic interface. It was an XML-editing app and I wanted certain XML tags to be available on a floating palette, but I didn't want to hard-code those tags into the application. Instead, I wanted the app to read the current list of available tags from a text file and configure the tool palette automatically -- that way new tags could be added without recompiling the application. But how to do that?

One way is to create a palette with the maximum number of buttons on it. Then when I read in my configuration file, I programmatically set up each button with the appropriate tag and delete the extra buttons and shrink the window to the smaller size.

But what if I don't want a maximum limit? If I set the number absurdly high -- say a thousand -- I'd be creating buttons all night!

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