Jump to content


Photo

Toolstripcontainer


  • Faça o login para participar
11 replies to this topic

#1 Felipe Pena

Felipe Pena

    O temor do Senhor é o princípio da sabedoria

  • Ex-Admins
  • 6441 posts
  • Sexo:Masculino

Posted 28/11/2006, 20:14

Olá pessoal, gostaria de saber qual seria a melhor maneira de exibir conteúdo em uma aplicação Windows de acordo com o item escolhido de um menu strip.
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. :click:
Felipe Pena
[...] ó terra, terra, terra; ouve a palavra do Senhor. — Jeremias 22:29

#2 MACUL

MACUL

    Doutor

  • Usuários
  • 770 posts
  • Sexo:Masculino
  • Localidade:SP

Posted 29/11/2006, 08:25

Exemplo de ToolStripContainer

vb.net
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 'Form1

C#
using 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);
 
	}
}


*************** M ** A ** C ** U ** L ***************

*************************************************

#3 Felipe Pena

Felipe Pena

    O temor do Senhor é o princípio da sabedoria

  • Ex-Admins
  • 6441 posts
  • Sexo:Masculino

Posted 29/11/2006, 08:47

Até aí tudo bem, mas o problema mesmo é como direcionar o conteúdo no ContentPanel de acordo com o item clicado no menu.

---

Consegui, era só eu seguir a idéia de como adicionar item no painel, como você mostrou. =)

RichTextBox rtxt = new RichTextBox();
			rtxt.Text = "Foo";
			this.toolStripContainer1.ContentPanel.Controls.Add(rtxt);

E em cada novo conteúdo limpar o ContentPanel com:
this.toolStripContainer1.ContentPanel.Controls.Clear();


Grato.

Edição feita por: Eclesiastes, 29/11/2006, 13:36.

Felipe Pena
[...] ó terra, terra, terra; ouve a palavra do Senhor. — Jeremias 22:29

#4 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 24/09/2017, 08:39

Cialis Authentique Ligne Vente Viagra A Nice cialis Where To Buy Kamagra Oral Jelly In South Africa Cialis Interacciones Medicamentosas
Amoxicillin And Pregnant buy cialis Publix Free Amoxicillin Viagra Homme Levitra Fiale

#5 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 08/10/2017, 06:59

Doryx 100mg Propecia 5mg Online Bestellen Stendra For Sale viagra online prescription Ordini Cialis Spese Di Spedizione Comprar Cialis Andorra Sin Receta
Buy Domperidone Without Prescription Viagra France Viagra Et Cialis Prix viagra Propecia Price Canada Amoxicillin Ortho Tricyclen Lo Interaction Analyse Du Clomid
Order Now Macrobid Website Cheapeast Free Doctor Consultation viagra Viagra Canada No Prescription
Priligy Modo De Usar Generic Online Pharmacy Tadalis Sx Soft vardenafil bestellen Under Eye
Canadian Generic Drug Manufacturers cialis Cialis For Sale Onlone Cuanto Cuesta Cialis Original

#6 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 22/10/2017, 08:52

Viagra Super P Force Viagra Medicina Buy Wellbutrin Without A Perscrition buy viagra Cialis Ohne Wirkung
Metronidazole Pills Online Achat Kamagra Angleterre order levitra from canada Discount Online Direct Acticin Pills Next Day Delivery Can Cephalexin Raise Blood Sugar
Alcobuse For Sale levitra online Viagra Pillola Blu
Welbutrin For Sale Cialis Canada Cost buy viagra Il Viagra A 20 Anni Priligy Dapoxetina Senza Ricetta

#7 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 31/10/2017, 23:20

Cialis Effetti Negativi How To Order Roaccutane In The Usa Propecia Vente Canada buy viagra online Cialis Wo Bestellen Erfahrungen Tetracycline 500mg Clarithromycin Omeprazole Amoxil

#8 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 04/11/2017, 18:08

Viagra O Cialis Priligy Dapoxetina Prezzo Kamagra 100mg Gel viagra Comprar Viagra Original Barcelona
Prix Du Tadalafil Precios De Kamagra Cialis Sirve Para Durar Mas viagra Buy Cheap Adderall Puedo Tomar Viagra Hipertension

#9 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 12/11/2017, 12:29

For Sale Levaquin Levox C.O.D Cipro And Amoxicillin In Lyme Disease Dove Comprare Viagra Cialis viagra Cialis Quotidien 5 Mg
Buy Dilantin No Script viagra Viagra Generique Achat

#10 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 16/11/2017, 21:33

Viagra Sin Receta En Sevilla Buy Zithromax 500mg Online viagra Achat Cialis En Ligne Amoxicillin Powder For Injections

#11 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 22/11/2017, 16:01

Comprare Cialis Con Postepay cialis price Comprar Cialis En Granada Cialis No Me Hace Efecto Worldwide Cheapeast Dutasteride Duagen Buy Oklahoma
Propecia Dhea Hair Loss In Men Priligy Opiniones cialis Medicamento Levitra
Canadian Pharmacies For Cialis Cialis Precio Mercadolibre Amoxicillin Joint Replacement viagra online Herbal Propecia Should Viagra O Cialis Buy Vigora

#12 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 27/11/2017, 10:25

Levitra Online Buying Europe Dove Comprare Cialis Yahoo Propecia Steiner buy viagra Cheap Mexican Pharmacy Neurontin No Perscription Need Paxil Fast Cephalexin For Strep
Ward Generique Cialis Forum viagra Indian Pharmacy Renova Price Keflex For Herpes
Per Il Viagra Ci Vuole Ricetta Cialis Generico Prezzo Farmacia Cialis Billig Auf Rechnung viagra online pharmacy Cialis Fiable
Celexa Canadian Pharmacy Comparaison Cialis Viagra Levitra viagra online prescription Buy Kelnor Online Canada Valtrex Buy Online Canada
Viagra Alcool Mort Dove Acquistare Cialis Sicuro viagra Order Non Perscription Levlen




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq