The only other solution I can think of (besides hacking the VCX as Paul suggested) is to instantiate the controls at runtime. That means you don't get a visual design surface because you have to set the Top, Left, Height, and Width properties of the controls manually as you add them. I suppose you could create a tool that take a class you designed visually and writes records to a table from all the controls in it, then have another class (the "real" one that gets instantiated) spin through that table, creating objects of the proper class and setting the properties as per the info in the table.
Hmm... Hacking the VCX sounds easier. :)
I have never run into this problem personally because I don't have a VCX of client-specific base controls (I can't think of anything about a textbox that would be client-specific, for example).
Maybe it's overkill. I don't know. I've only dealt with one client since seting this up. I was just thinking it would be nice to have them seperated by client in case I run into one that, say, doesn't like the font in the textbox.
This may also be resolved using the technique outlined above. Alternatively, you could have an array or collection at the container level that defines the control sources for the various controls. In the Refresh of each control (you can't do it in Init since that method fires for a control before the container), if ControlSource is empty, ask the container to return the control source for this control. The container would look in the array or collection and return the appropriate value.
That's an interesting idea...
Thanks,
Michelle
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only