Exemple #1
0
 protected override void OnControlAdded(ControlEventArgs e)
 {
     base.OnControlAdded(e);
     if (e.Control is EmptyPanel)
         return;
     TheControl = e.Control;
     e.Control.Dock = DockStyle.Fill;
     emptyPanel1 = new EmptyPanel();
     emptyPanel1.Dock = DockStyle.Fill;
     Controls.Add(emptyPanel1);
     emptyPanel1.BringToFront();
     emptyPanel1.Enabled = !TheControl.Enabled;
     TheControl.EnabledChanged += new EventHandler(TheControl_EnabledChanged);
 }
Exemple #2
0
 protected override void OnControlAdded(ControlEventArgs e)
 {
     base.OnControlAdded(e);
     if (e.Control is EmptyPanel)
     {
         return;
     }
     TheControl       = e.Control;
     e.Control.Dock   = DockStyle.Fill;
     emptyPanel1      = new EmptyPanel();
     emptyPanel1.Dock = DockStyle.Fill;
     Controls.Add(emptyPanel1);
     emptyPanel1.BringToFront();
     emptyPanel1.Enabled        = !TheControl.Enabled;
     TheControl.EnabledChanged += new EventHandler(TheControl_EnabledChanged);
 }