Ejemplo n.º 1
0
        private Button AddAnnotationButton(Annotation annotation)
        {
            var b = new Button();

            b.Size = new Size(ButtonHeight, ButtonHeight);
            b.Image = annotation.GetOpenOrClosedImage(ButtonImageHeight);
            b.Tag = annotation;
            b.FlatStyle = FlatStyle.Flat;
            b.FlatAppearance.BorderSize = 0;
            toolTip1.SetToolTip(b, annotation.GetTextForToolTip());

            b.Click += new EventHandler(OnExistingAnnotationButtonClick);
            _buttonsPanel.Controls.Add(b);
            return b;
        }