Ejemplo n.º 1
0
        private void resize_pages()
        {
            foreach (TabPage page in tabControl_boards.TabPages)
            {
                page.Size = new Size(tabControl_boards.Width, tabControl_boards.Height);                //(page.Controls[0].Height + 2) * iface.current_job.Biby);
                var x      = page.Size.Width - 10;
                var y      = page.Size.Height;
                var width  = x / iface.current_job.Bibx;
                var height = y / iface.current_job.Biby;

                for (int i = 0; i < iface.current_job.Biby; i++)                 //column
                {
                    for (int j = 0; j < iface.current_job.Bibx; j++)             //row
                    {
                        Label label = (Label)page.Controls[(i * iface.current_job.Bibx) + j];
                        label.Location = new Point(j * width, (i * height) + 1);                         //calculated height based on loop position
                        label.Size     = new Size(width - 3, height - 2);
                    }
                }

                myLabel prototype = (myLabel)page.Controls[page.Controls.Count - 1];
                prototype.Size = new Size(10, y - 20);
                prototype.Left = x - 5;
                prototype.Top  = 10;

                //page.Size = new Size(tabControl_boards.Width, (page.Controls[0].Height+2)*iface.current_job.Biby);
            }
            //tabControl_boards.Size = new Size(tabControl_boards.Width, tabControl_boards.TabPages[0].Height + 28);
        }
Ejemplo n.º 2
0
        private void create_finger(int x, int y)
        {
            myLabel prototype = new myLabel();             //this draws the golden box using a rotate label, filled in

            prototype.RotateAngle = 90;
            prototype.BackColor   = System.Drawing.Color.Gold;
            prototype.Size        = new Size(10, y - 20);
            //prototype.Anchor = AnchorStyles.Right;

            board_dispaly.Controls.Add(prototype);
            prototype.Left = x - 5;
            prototype.Top  = 10;
        }