Пример #1
0
        public LBButton()
        {
            // Initialization
            InitializeComponent();

            // Properties initialization
            this.buttonColor = Color.Red;

            // Set the styles for drawing
            SetStyle(ControlStyles.AllPaintingInWmPaint |
                     ControlStyles.ResizeRedraw |
                     ControlStyles.DoubleBuffer |
                     ControlStyles.SupportsTransparentBackColor,
                     true);

            // Transparent background
            this.BackColor = Color.Transparent;

            // Create the default renderer
            this.defaultRenderer        = new LBButtonRenderer();
            this.defaultRenderer.Button = this;
            this.renderer = null;

            // Calculate the initial dimensions
            this.CalculateDimensions();
        }
Пример #2
0
        public LBButton()
        {
            // Initialization
            InitializeComponent();

            // Properties initialization
            this.buttonColor = Color.Red;

            // Set the styles for drawing
            SetStyle(ControlStyles.AllPaintingInWmPaint |
                ControlStyles.ResizeRedraw |
                ControlStyles.DoubleBuffer |
                ControlStyles.SupportsTransparentBackColor,
                true);

            // Transparent background
            this.BackColor = Color.Transparent;

            // Create the default renderer
            this.defaultRenderer = new LBButtonRenderer();
            this.defaultRenderer.Button = this;
            this.renderer = null;

            // Calculate the initial dimensions
            this.CalculateDimensions();
        }