ImageList in base class not working correctly in inherited class

G

Guest

I have created a ImageList instance in a base class that inherits from
usercontrol.

I next created a class that inherits from this base class that contains a
toolbar control that uses the ImageList.

From this class I have created several different classes that inherit from
this class and adds the toolbar as a control.

When you put one of these inherited classes in design mode, the imagelist is
being copied into the inherited class. This is causing the toolbar to not
display properly. Removing the code fixes the problem.

What is happening?
 
K

Kevin Yu [MSFT]

Hi,

We have reviewed this issue and are currently researching on it. We will
update you ASAP. Thanks for your patience!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
G

Guest

Here is what I did:

I created a base class that is a user control (inherits from usercontrol).
I dragged an ImageList from the toolbox onto the designer form. Added my
images. Changed the friend attribute on the imagelist to public.

I next created another class that inherits from this base class. In this
class I created a toolbar instance. I added the imagelist to the imagelist
property of the toolbar.

I created another class that inherits from this class. I manually add the
toolbar the controls collection.

Flipping to design mode on this class causes the imagelist to be
automatically duplicated.

I have currently abandoned this approach because of this problem.
 
J

Jeffrey Tan[MSFT]

Hi,

Thanks for your feedback.

Currently, I am still can not reproduce out your problem on my side.
Anyway, I see that you have abandoned this approach.

If you need further help, please feel free to post. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top