Acredito que seja pela toolStripContainer, mas não encontrei exemplos de como adicionar conteúdo para cada item clicado no menu.
Desde já, agradeço.
Posted 28/11/2006, 20:14
Posted 29/11/2006, 08:25
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Text
Imports System.Windows.Forms
Public Class Form1
Inherits Form
Private toolStripContainer1 As ToolStripContainer
Private toolStrip1 As ToolStrip
Public Sub New()
InitializeComponent()
End Sub 'New
<STAThread()> _
Shared Sub Main()
Application.EnableVisualStyles()
Application.Run(New Form1())
End Sub 'Main
Private Sub InitializeComponent()
toolStripContainer1 = New System.Windows.Forms.ToolStripContainer()
toolStrip1 = New System.Windows.Forms.ToolStrip()
' Add items to the ToolStrip.
toolStrip1.Items.Add("One")
toolStrip1.Items.Add("Two")
toolStrip1.Items.Add("Three")
' Add the ToolStrip to the top panel of the ToolStripContainer.
toolStripContainer1.TopToolStripPanel.Controls.Add(toolStrip1)
' Add the ToolStripContainer to the form.
Controls.Add(toolStripContainer1)
End Sub 'InitializeComponent
End Class 'Form1using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
public class Form1 : Form
{
private ToolStripContainer toolStripContainer1;
private ToolStrip toolStrip1;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new Form1());
}
private void InitializeComponent()
{
toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
toolStrip1 = new System.Windows.Forms.ToolStrip();
// Add items to the ToolStrip.
toolStrip1.Items.Add("One");
toolStrip1.Items.Add("Two");
toolStrip1.Items.Add("Three");
// Add the ToolStrip to the top panel of the ToolStripContainer.
toolStripContainer1.TopToolStripPanel.Controls.Add(toolStrip1);
// Add the ToolStripContainer to the form.
Controls.Add(toolStripContainer1);
}
}
Posted 29/11/2006, 08:47
RichTextBox rtxt = new RichTextBox(); rtxt.Text = "Foo"; this.toolStripContainer1.ContentPanel.Controls.Add(rtxt);
this.toolStripContainer1.ContentPanel.Controls.Clear();
Edição feita por: Eclesiastes, 29/11/2006, 13:36.
Posted 24/09/2017, 08:39
Posted 08/10/2017, 06:59
Posted 22/10/2017, 08:52
Posted 31/10/2017, 23:20
Posted 22/11/2017, 16:01
Posted 27/11/2017, 10:25
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)