private Control CreatePreviewControl(string name, Control ctl)
        {
            ctlPreview prevCtl = new ctlPreview();

            if (ctl != null)
            {
                if (ctl.Width > 20)
                {
                    prevCtl.Width = ctl.Width;
                }
                if (ctl.Height > 10)
                {
                    prevCtl.Height = ctl.Height;
                }
                prevCtl.Dock = ctl.Dock;
                if (ctl is ctlImageButton)
                {
                    prevCtl.Image = ((ctlImageButton)ctl).Image;
                }
            }
            prevCtl.Text         = name;
            prevCtl.Name         = name;
            Controls["!" + name] = prevCtl;
            if (guiConf.PreviewMode)
            {
                ctl.MouseEnter += new EventHandler(ctl_MouseEnter);
            }
            return(prevCtl);
        }
Beispiel #2
0
 private Control CreatePreviewControl(string name, Control ctl)
 {
     Control prevCtl = new ctlPreview();
     if (ctl != null)
     {
         if (ctl.Width >  20)
             prevCtl.Width = ctl.Width;
         if (ctl.Height > 10)
             prevCtl.Height = ctl.Height;
         prevCtl.Dock = ctl.Dock;
     }
     prevCtl.Text = name;
     prevCtl.Name = name;
     Controls["!" +  name] = ctl;
     if (guiConf.PreviewMode)
         ctl.MouseEnter += new EventHandler(ctl_MouseEnter);
     return prevCtl;
 }