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 15.4 ('Xojo in Germany')
Instant purchase and download via GumRoad!



Issue: 15.4 (July/August 2017)
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): 6,865
Starting Page Number: 77
Article Number: 15408
Resource File(s):

Download Icon project15408.zip Updated: 2017-07-02 23:30:00

Related Link(s): None

Excerpt of article text...

Someone on the forums recently asked about how to initialize a Listbox without using the InitialValue setting, which you have to set within the IDE. Sometimes you want a Listbox (or another control) to have an initial value, but the data you want to include might be dynamic and not available when the app is being created.

(A perfect example is reloading a user's previous values into a control upon launch so that everything is the way the user left it when they last quit the app.)

The way I have solved this problem is via one of Xojo's most powerful and under-appreciated techniques: class extensions.

I've written about class extensions before, but they're worth a revisit. Extensions allow you to "extend" a class without creating a subclass.

Creating a subclass isn't difficult, of course, but it's extra work and it requires that all the instances of that class in your project be changed to the subclass type. Class extensions are cool because they let you add features to the built-in classes without having to change the rest of your program.


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