Emilie

Emilie

  • NA
  • 4
  • 0

TabControl Page using custom user control

Apr 23 2008 7:35 PM
Hi everyone,

In my application I have a main form that is split in two areas. One on the left that is the TabControl and one on the right that is a TreeViewControl.
I set up a new user control in my project solution such a way that I can instanciate it at runtime to create TabPage instances for my TabControl at runtime. Does that make sense? It works well for now, but I came to a point where I need to trigger an event when I click on a submit button located on one of these TabPages and it would do something in my TreeViewControl...
I tried to implement that but apparently my TabPage code context does not know the TreeViewControl (I kinda understand why since at design time, that code does not care what it'll be instanciated for, right?)...
So am I on the right tracks?... maybe not, object oriented is far for me... please advise :)


Answers (3)