﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DodajGradnik
{
    public partial class DodajamoOznake : Form
    {
        public DodajamoOznake()
        {
            InitializeComponent();
        }

        private void gmbDesign_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < 5; i++)
            {
                Label ozn = new Label();
                ozn.Text = "Oznaka " + (i + 1).ToString();
                ozn.Location = new Point(700, 50 + i * 40);
                ozn.Click += new System.EventHandler(this.ZbrisiOznako);
                this.Controls.Add(ozn);
            }
        }

        private void ZbrisiOznako(object sender, EventArgs e)
        {
            this.Controls.Remove((Label)sender);
        }
    }
}
