Beispiel #1
0
        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            CalculateBounds(e);

            foreach (ToolButton tool in tools)
            {
                PaintLibrary.Button(e, tool.Bounds.Location, tool.Bounds.Size, tool.Text, highlightedButton == tool);
            }
        }
Beispiel #2
0
        protected override void OnPaint(WinForms.PaintEventArgs pe)
        {
            if (this.Size.Height != 22)
            {
                this.Size = new Size(this.Size.Width, 22);
            }

            PaintLibrary.Box(pe, this.Size, "", true);
        }
Beispiel #3
0
        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            this.CalculateBounds(e);

            foreach (ListItem item in this.items)
            {
                Rectangle area = new Rectangle(item.Bounds.Location, item.Bounds.Size);
                PaintLibrary.Label(e, area, item.Text, new Font("Arial", 14), StringAlignment.Near, StringAlignment.Center, Color.Black, this.highlightedItem == item);
            }
        }
Beispiel #4
0
        protected override void OnPaint(WinForms.PaintEventArgs pe)
        {
            if (this.Size.Height != 22)
            {
                this.Size = new Size(this.Size.Width, 22);
            }

            base.OnPaint(pe);

            Rectangle area = new Rectangle(0, 0, this.Size.Width, this.Size.Height);

            PaintLibrary.Label(pe, area, this.Text, new Font("Arial", 14), StringAlignment.Center, StringAlignment.Center, Color.Black, false);
        }
Beispiel #5
0
        protected override void CalculateBounds(System.Windows.Forms.PaintEventArgs e)
        {
            if (tools.Count == 1)
            {
                PaintLibrary.Button(e, new Point(0, 0), Size, this.Text, highlightedButton == tools[0]);
            }
            else if (tools.Count > 1)
            {
                const int PADDING = 4;

                Size  size     = new Size((Size.Width / tools.Count) - PADDING, Size.Height);
                Point location = new Point(0, 0);

                foreach (ToolButton tool in tools)
                {
                    tool.Bounds = new Rectangle(location, size);
                    location.X += PADDING + size.Width;
                }
            }
        }
Beispiel #6
0
 protected override void OnPaint(WinForms.PaintEventArgs pe)
 {
     PaintLibrary.Box(pe, this.Size, string.Empty, true);
     base.OnPaint(pe);
 }
Beispiel #7
0
 protected override void OnPaint(System.Windows.Forms.PaintEventArgs pe)
 {
     base.OnPaint(pe);
     PaintLibrary.Button(pe, new Point(0, 0), this.Size, this.Text, false);
 }