#region ================== Copyright (c) 2007 Pascal vd Heiden /* * Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com * This program is released under GNU General Public License * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #endregion #region ================== Namespaces using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Text; using System.Globalization; using System.Windows.Forms; using CodeImp.DoomBuilder.Actions; using CodeImp.DoomBuilder.Geometry; using CodeImp.DoomBuilder.Rendering; using CodeImp.DoomBuilder.Editing; #endregion namespace CodeImp.DoomBuilder.Controls { public class TransparentPanel : Panel { #region ================== Constructor / Disposer // Constructor public TransparentPanel() { } #endregion #region ================== Methods // Override this property protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; cp.ExStyle |= 0x20; return cp; } } // Disable background drawing by overriding this protected override void OnPaintBackground(PaintEventArgs e) { if(BackColor != Color.Transparent) e.Graphics.Clear(BackColor); } #endregion } }