views:

211

answers:

1

I have an interface which return a Control based on File Name for example if there's an html file I am returing an Instance of WebBrowser Componet.

This WebBrowser Component inherits from WebBrowser Class. I need to update this component so that it can accomodate a grid as well.

What Should I do ?

I am working on Windows Application C# 2.0

+1  A: 

Instead of having your user control inherit directly from WebBrowser, you can instead have it inherit from UserControl - this will make your control something like an ordinary panel, on which you can place one or more other controls. Then have code that either creates a WebBrowser control and adds it to your control's Controls collection, or else creates a grid and adds it to the Controls collection, based on your needs.

MusiGenesis
Exactly 
Robert Venables