tabPage in plugins dll

  • Thread starter Thread starter FBU
  • Start date Start date
F

FBU

Hello,

I'm actually writing a c# application for my PPC that loads dynamically dlls
(using the .NET reflection).
The main application is made of a main form with a tabControl.
The tabControl contains initially one tabPage. The other tabPages are loaded
one by one (plugin).

Thus, a plugin is a class X derived from a base class Y. The base class is
derived from the TabPage (and two interfaces).
The class X has its own 'InitializeComponent' function (virtual) to
initialise its members (buttons, editbox,etc).

When the application starts, the plugins (tabPages) are added to the
tabControl of the main form.
The result is that all tabPages (dynamically loaded) appears on the
tabControl but no controls inside are displayed. Thus the tab appears
completely blank.

Any idea of what could be the problem?

Thank you,
Frédéric de Buisseret.
 
Frédéric,
What evidence do you have the InitializeComponent' is being invoked? Is
the creation of the TabPage itself called in this method?

Could you post a sample of the code?
Thanks
 
Todd,

First, sorry, i answer with delay. I didn't have yet an user account
here. Now,it is done..

I finally find a way to solve my problem. I found a french article
(illustrated with code).

http://drq.developpez.com/dotnet/articles/plugin/csharp/

But, you were right, it was the function InitializeComponents() from the
base class that was called. And i don't really find out why it was not
the InitializeComponents of the derived class.

Anyway, thank you for help.

Regards,
Frédéric.
 
Back
Top