Article Preview
Buy Now
COLUMN
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):
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.