Ejemplo n.º 1
0
        private void OnAddToolButton(object sender, EventArgs e)
        {
            StiToolButton toolbutton = new StiToolButton();

            toolbutton.Dock = DockStyle.Top;
            outlookPanel.Controls.Add(toolbutton);
            outlookPanel.Invalidate();
        }
Ejemplo n.º 2
0
        private void OnAddToolButton(object sender, EventArgs e)
        {
            IDesignerHost       host        = ((IDesignerHost)base.GetService(typeof(IDesignerHost)));
            DesignerTransaction transaction = host.CreateTransaction("Add ToolButton");
            StiToolButton       toolButton  = ((StiToolButton)host.CreateComponent(typeof(StiToolButton)));

            toolButton.Dock = DockStyle.Left;
            this.toolBar.Controls.Add(toolButton);
            this.toolBar.Controls.SetChildIndex(toolButton, 0);
            transaction.Commit();
        }