By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,050 Members | 1,703 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,050 IT Pros & Developers. It's quick & easy.

Override child control of inherited class

P: n/a
I'm trying to override the toolstripcontainer class to "skin" it and handle
some other things. The problem I'm having is that the container contains the

this.exToolStripContainer1.TopToolStripPanel.Contr ols.Add(this.exToolStrip1);

How can I override the OnPaint and OnPaintBackground of TopToolStripPanel?

Do I have to create an ExTopToolStripPanel tht inherits TopToolStripPanel
and do something like

this.exToolStripContainer1.ExTopToolStripPanel.Con trols.Add(this.exToolStrip1);

(seems like it will work but seems like a lot of work just to get at the
OnPaint methods since I don't need anything else)

it would be nice if I could do something like

protected override void TopToolStripPanel.OnPaint(PaintEventArgs e)



but obviously that doesn't work ;/ (not sure if its even semantically

Also, by doing this I end up "breaking" VS.Net's design features. I'm sure
theres a way to mimic them but I'm not sure how(I do get the properties to
work but these don't work in the toolbox well)? I don't really need to much
of an explination how but just needt o know if its possible(for later) and
if I can find good help on it(in MSDN or www).



Sep 30 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.