On Feb 23, 2006, at 11:47 AM, Dobbs, Paul wrote:
I have an application in which I am using a number of container
controls
like a pagepanel. All of the container controls have one element in
common: a listbox named ItemList. What I would like to do is to put
ItemList in a container control (CCDad?) and subclass all the other
container controls from it, having ItemList show up on each subclassed
container control. That way, instead of having to write a function
which
returns whether ItemList has a selection in every container control, I
could just write it once and put it into CCDad. Sure would save a
lot of
work, not to mention cutting down on the possibility of errors.
But whenever I try this sort of thing, I an error with the text: "You
cannot implement a nonexistent event." (I have no code in any of the
events in the container controls.)
Is there a way to do this sort of thing? I know that I can create a
new
class (maybe CCPapa), make its super ContainerControl and then
subclass
it. Iv'e done that. It works. But you can't put controls into CCPapa.
Right. I think there is a trick that you can do to make Window
subclasses (and I assume ContainerControls since they are Windows
subclasses) work they way you are trying, but you would still not be
able to put controls on it.
The easiest (though probably not the best) solution that I can think
of is to create a second ContainerControl which just wraps a
ListBox. Then in the Open() event of your CC, dynamically embed the
ListboxCC (or whatever you call it).
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>