>I'm using MyImageButtonClass, but want to use MyTextButtonClass based on the value of a property on the form. How do I do that? Do I make one invisible? That seems clunky. What would be the right way to handle it? Thanks!
There's no right way but then every way is right until you find a better one.
My trick for some cases of delayed instantiation was to have a placeholder object, usually a shape, which would do what its name says. Then when actually instantiating the actual object I wanted, I'd pass the shape as parameter to its .init(), so it would take the position and size from it. Then I'd kill the shape - which was simple when I did this from shape's .init(), I'd simply return .f. and the shape will never have existed. If I'd have to do it later, then I'd have to hide the shape when done, or .removeobject() it or just set it .visible=.f. - whichever works.
The reason for this is that there's only one object at design time to take care of, giving me quite a good idea of how it will look.