コード例 #1
0
		/// <summary> 
		/// Método necesario para admitir el Diseñador. No se puede modificar 
		/// el contenido del método con el editor de código.
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RichTextBoxExtended));
			this.tlbFormat = new System.Windows.Forms.ToolStrip();
			this.tlbBold = new System.Windows.Forms.ToolStripButton();
			this.tlbItalic = new System.Windows.Forms.ToolStripButton();
			this.tlbUnderline = new System.Windows.Forms.ToolStripButton();
			this.tlbColor = new System.Windows.Forms.ToolStripButton();
			this.panel1 = new System.Windows.Forms.Panel();
			this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
			this.rtfTextBox = new Bau.Controls.TextBox.ExRichTextBox();
			this.ctxMenuEdit = new System.Windows.Forms.ContextMenuStrip(this.components);
			this.mnuEditCopy = new System.Windows.Forms.ToolStripMenuItem();
			this.mnuEditCut = new System.Windows.Forms.ToolStripMenuItem();
			this.mnuEditPaste = new System.Windows.Forms.ToolStripMenuItem();
			this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
			this.mnuEditRemove = new System.Windows.Forms.ToolStripMenuItem();
			this.dlgColor = new System.Windows.Forms.ColorDialog();
			this.tlbFormat.SuspendLayout();
			this.panel1.SuspendLayout();
			this.tableLayoutPanel1.SuspendLayout();
			this.ctxMenuEdit.SuspendLayout();
			this.SuspendLayout();
			// 
			// tlbFormat
			// 
			this.tlbFormat.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
			this.tlbFormat.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.tlbBold,
            this.tlbItalic,
            this.tlbUnderline,
            this.tlbColor});
			this.tlbFormat.Location = new System.Drawing.Point(0, 0);
			this.tlbFormat.Name = "tlbFormat";
			this.tlbFormat.Size = new System.Drawing.Size(345, 24);
			this.tlbFormat.TabIndex = 1;
			this.tlbFormat.Text = "toolStrip1";
			// 
			// tlbBold
			// 
			this.tlbBold.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
			this.tlbBold.Image = ((System.Drawing.Image)(resources.GetObject("tlbBold.Image")));
			this.tlbBold.ImageTransparentColor = System.Drawing.Color.Magenta;
			this.tlbBold.Name = "tlbBold";
			this.tlbBold.Size = new System.Drawing.Size(23, 21);
			this.tlbBold.Text = "toolStripButton3";
			this.tlbBold.ToolTipText = "Negrita";
			this.tlbBold.Click += new System.EventHandler(this.tlbBold_Click);
			// 
			// tlbItalic
			// 
			this.tlbItalic.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
			this.tlbItalic.Image = ((System.Drawing.Image)(resources.GetObject("tlbItalic.Image")));
			this.tlbItalic.ImageTransparentColor = System.Drawing.Color.Magenta;
			this.tlbItalic.Name = "tlbItalic";
			this.tlbItalic.Size = new System.Drawing.Size(23, 21);
			this.tlbItalic.Text = "toolStripButton4";
			this.tlbItalic.ToolTipText = "Cursiva";
			this.tlbItalic.Click += new System.EventHandler(this.tlbItalic_Click);
			// 
			// tlbUnderline
			// 
			this.tlbUnderline.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
			this.tlbUnderline.Image = ((System.Drawing.Image)(resources.GetObject("tlbUnderline.Image")));
			this.tlbUnderline.ImageTransparentColor = System.Drawing.Color.Magenta;
			this.tlbUnderline.Name = "tlbUnderline";
			this.tlbUnderline.Size = new System.Drawing.Size(23, 21);
			this.tlbUnderline.Text = "toolStripButton5";
			this.tlbUnderline.ToolTipText = "Subrayado";
			this.tlbUnderline.Click += new System.EventHandler(this.tlbUnderline_Click);
			// 
			// tlbColor
			// 
			this.tlbColor.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
			this.tlbColor.Image = ((System.Drawing.Image)(resources.GetObject("tlbColor.Image")));
			this.tlbColor.ImageTransparentColor = System.Drawing.Color.Magenta;
			this.tlbColor.Name = "tlbColor";
			this.tlbColor.Size = new System.Drawing.Size(23, 21);
			this.tlbColor.Text = "toolStripButton1";
			this.tlbColor.ToolTipText = "Color del texto";
			this.tlbColor.Click += new System.EventHandler(this.tlbColor_Click);
			// 
			// panel1
			// 
			this.panel1.Controls.Add(this.tableLayoutPanel1);
			this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.panel1.Location = new System.Drawing.Point(0, 0);
			this.panel1.Name = "panel1";
			this.panel1.Size = new System.Drawing.Size(345, 339);
			this.panel1.TabIndex = 3;
			// 
			// tableLayoutPanel1
			// 
			this.tableLayoutPanel1.ColumnCount = 1;
			this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
			this.tableLayoutPanel1.Controls.Add(this.tlbFormat, 0, 0);
			this.tableLayoutPanel1.Controls.Add(this.rtfTextBox, 0, 1);
			this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
			this.tableLayoutPanel1.Name = "tableLayoutPanel1";
			this.tableLayoutPanel1.RowCount = 2;
			this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F));
			this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
			this.tableLayoutPanel1.Size = new System.Drawing.Size(345, 339);
			this.tableLayoutPanel1.TabIndex = 4;
			// 
			// rtfTextBox
			// 
			this.rtfTextBox.AcceptsTab = true;
			this.rtfTextBox.ContextMenuStrip = this.ctxMenuEdit;
			this.rtfTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
			this.rtfTextBox.HighlightColor = Bau.Controls.TextBox.RtfColor.White;
			this.rtfTextBox.Location = new System.Drawing.Point(3, 27);
			this.rtfTextBox.Name = "rtfTextBox";
			this.rtfTextBox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
			this.rtfTextBox.ShowSelectionMargin = true;
			this.rtfTextBox.Size = new System.Drawing.Size(339, 309);
			this.rtfTextBox.TabIndex = 3;
			this.rtfTextBox.Text = "";
			this.rtfTextBox.TextColor = Bau.Controls.TextBox.RtfColor.Black;
			// 
			// ctxMenuEdit
			// 
			this.ctxMenuEdit.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.mnuEditCopy,
            this.mnuEditCut,
            this.mnuEditPaste,
            this.toolStripMenuItem1,
            this.mnuEditRemove});
			this.ctxMenuEdit.Name = "ctxMenuEdit";
			this.ctxMenuEdit.Size = new System.Drawing.Size(117, 98);
			this.ctxMenuEdit.Opening += new System.ComponentModel.CancelEventHandler(this.ctxMenuEdit_Opening);
			// 
			// mnuEditCopy
			// 
			this.mnuEditCopy.Image = global::Bau.Controls.Properties.Resources.Copy;
			this.mnuEditCopy.Name = "mnuEditCopy";
			this.mnuEditCopy.Size = new System.Drawing.Size(116, 22);
			this.mnuEditCopy.Text = "&Copiar";
			this.mnuEditCopy.Click += new System.EventHandler(this.mnuEditCopy_Click);
			// 
			// mnuEditCut
			// 
			this.mnuEditCut.Image = global::Bau.Controls.Properties.Resources.Cut;
			this.mnuEditCut.Name = "mnuEditCut";
			this.mnuEditCut.Size = new System.Drawing.Size(116, 22);
			this.mnuEditCut.Text = "C&ortar";
			this.mnuEditCut.Click += new System.EventHandler(this.mnuEditCut_Click);
			// 
			// mnuEditPaste
			// 
			this.mnuEditPaste.Image = global::Bau.Controls.Properties.Resources.Paste;
			this.mnuEditPaste.Name = "mnuEditPaste";
			this.mnuEditPaste.Size = new System.Drawing.Size(116, 22);
			this.mnuEditPaste.Text = "&Pegar";
			this.mnuEditPaste.Click += new System.EventHandler(this.mnuEditPaste_Click);
			// 
			// toolStripMenuItem1
			// 
			this.toolStripMenuItem1.Name = "toolStripMenuItem1";
			this.toolStripMenuItem1.Size = new System.Drawing.Size(113, 6);
			// 
			// mnuEditRemove
			// 
			this.mnuEditRemove.Image = global::Bau.Controls.Properties.Resources.Remove;
			this.mnuEditRemove.Name = "mnuEditRemove";
			this.mnuEditRemove.Size = new System.Drawing.Size(116, 22);
			this.mnuEditRemove.Text = "&Eliminar";
			this.mnuEditRemove.Click += new System.EventHandler(this.mnuEditRemove_Click);
			// 
			// RichTextBoxExtended
			// 
			this.Controls.Add(this.panel1);
			this.Name = "RichTextBoxExtended";
			this.Size = new System.Drawing.Size(345, 339);
			this.tlbFormat.ResumeLayout(false);
			this.tlbFormat.PerformLayout();
			this.panel1.ResumeLayout(false);
			this.tableLayoutPanel1.ResumeLayout(false);
			this.tableLayoutPanel1.PerformLayout();
			this.ctxMenuEdit.ResumeLayout(false);
			this.ResumeLayout(false);

		}
コード例 #2
0
 /// <summary>
 /// Método necesario para admitir el Diseñador. No se puede modificar
 /// el contenido del método con el editor de código.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RichTextBoxExtended));
     this.tlbFormat          = new System.Windows.Forms.ToolStrip();
     this.tlbBold            = new System.Windows.Forms.ToolStripButton();
     this.tlbItalic          = new System.Windows.Forms.ToolStripButton();
     this.tlbUnderline       = new System.Windows.Forms.ToolStripButton();
     this.tlbColor           = new System.Windows.Forms.ToolStripButton();
     this.panel1             = new System.Windows.Forms.Panel();
     this.tableLayoutPanel1  = new System.Windows.Forms.TableLayoutPanel();
     this.rtfTextBox         = new Bau.Controls.TextBox.ExRichTextBox();
     this.ctxMenuEdit        = new System.Windows.Forms.ContextMenuStrip(this.components);
     this.mnuEditCopy        = new System.Windows.Forms.ToolStripMenuItem();
     this.mnuEditCut         = new System.Windows.Forms.ToolStripMenuItem();
     this.mnuEditPaste       = new System.Windows.Forms.ToolStripMenuItem();
     this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
     this.mnuEditRemove      = new System.Windows.Forms.ToolStripMenuItem();
     this.dlgColor           = new System.Windows.Forms.ColorDialog();
     this.tlbFormat.SuspendLayout();
     this.panel1.SuspendLayout();
     this.tableLayoutPanel1.SuspendLayout();
     this.ctxMenuEdit.SuspendLayout();
     this.SuspendLayout();
     //
     // tlbFormat
     //
     this.tlbFormat.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
     this.tlbFormat.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.tlbBold,
         this.tlbItalic,
         this.tlbUnderline,
         this.tlbColor
     });
     this.tlbFormat.Location = new System.Drawing.Point(0, 0);
     this.tlbFormat.Name     = "tlbFormat";
     this.tlbFormat.Size     = new System.Drawing.Size(345, 24);
     this.tlbFormat.TabIndex = 1;
     this.tlbFormat.Text     = "toolStrip1";
     //
     // tlbBold
     //
     this.tlbBold.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.tlbBold.Image                 = ((System.Drawing.Image)(resources.GetObject("tlbBold.Image")));
     this.tlbBold.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.tlbBold.Name        = "tlbBold";
     this.tlbBold.Size        = new System.Drawing.Size(23, 21);
     this.tlbBold.Text        = "toolStripButton3";
     this.tlbBold.ToolTipText = "Negrita";
     this.tlbBold.Click      += new System.EventHandler(this.tlbBold_Click);
     //
     // tlbItalic
     //
     this.tlbItalic.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.tlbItalic.Image                 = ((System.Drawing.Image)(resources.GetObject("tlbItalic.Image")));
     this.tlbItalic.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.tlbItalic.Name        = "tlbItalic";
     this.tlbItalic.Size        = new System.Drawing.Size(23, 21);
     this.tlbItalic.Text        = "toolStripButton4";
     this.tlbItalic.ToolTipText = "Cursiva";
     this.tlbItalic.Click      += new System.EventHandler(this.tlbItalic_Click);
     //
     // tlbUnderline
     //
     this.tlbUnderline.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.tlbUnderline.Image                 = ((System.Drawing.Image)(resources.GetObject("tlbUnderline.Image")));
     this.tlbUnderline.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.tlbUnderline.Name        = "tlbUnderline";
     this.tlbUnderline.Size        = new System.Drawing.Size(23, 21);
     this.tlbUnderline.Text        = "toolStripButton5";
     this.tlbUnderline.ToolTipText = "Subrayado";
     this.tlbUnderline.Click      += new System.EventHandler(this.tlbUnderline_Click);
     //
     // tlbColor
     //
     this.tlbColor.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.tlbColor.Image                 = ((System.Drawing.Image)(resources.GetObject("tlbColor.Image")));
     this.tlbColor.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.tlbColor.Name        = "tlbColor";
     this.tlbColor.Size        = new System.Drawing.Size(23, 21);
     this.tlbColor.Text        = "toolStripButton1";
     this.tlbColor.ToolTipText = "Color del texto";
     this.tlbColor.Click      += new System.EventHandler(this.tlbColor_Click);
     //
     // panel1
     //
     this.panel1.Controls.Add(this.tableLayoutPanel1);
     this.panel1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.panel1.Location = new System.Drawing.Point(0, 0);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(345, 339);
     this.panel1.TabIndex = 3;
     //
     // tableLayoutPanel1
     //
     this.tableLayoutPanel1.ColumnCount = 1;
     this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
     this.tableLayoutPanel1.Controls.Add(this.tlbFormat, 0, 0);
     this.tableLayoutPanel1.Controls.Add(this.rtfTextBox, 0, 1);
     this.tableLayoutPanel1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
     this.tableLayoutPanel1.Name     = "tableLayoutPanel1";
     this.tableLayoutPanel1.RowCount = 2;
     this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F));
     this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
     this.tableLayoutPanel1.Size     = new System.Drawing.Size(345, 339);
     this.tableLayoutPanel1.TabIndex = 4;
     //
     // rtfTextBox
     //
     this.rtfTextBox.AcceptsTab          = true;
     this.rtfTextBox.ContextMenuStrip    = this.ctxMenuEdit;
     this.rtfTextBox.Dock                = System.Windows.Forms.DockStyle.Fill;
     this.rtfTextBox.HighlightColor      = Bau.Controls.TextBox.RtfColor.White;
     this.rtfTextBox.Location            = new System.Drawing.Point(3, 27);
     this.rtfTextBox.Name                = "rtfTextBox";
     this.rtfTextBox.ScrollBars          = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
     this.rtfTextBox.ShowSelectionMargin = true;
     this.rtfTextBox.Size                = new System.Drawing.Size(339, 309);
     this.rtfTextBox.TabIndex            = 3;
     this.rtfTextBox.Text                = "";
     this.rtfTextBox.TextColor           = Bau.Controls.TextBox.RtfColor.Black;
     //
     // ctxMenuEdit
     //
     this.ctxMenuEdit.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.mnuEditCopy,
         this.mnuEditCut,
         this.mnuEditPaste,
         this.toolStripMenuItem1,
         this.mnuEditRemove
     });
     this.ctxMenuEdit.Name     = "ctxMenuEdit";
     this.ctxMenuEdit.Size     = new System.Drawing.Size(117, 98);
     this.ctxMenuEdit.Opening += new System.ComponentModel.CancelEventHandler(this.ctxMenuEdit_Opening);
     //
     // mnuEditCopy
     //
     this.mnuEditCopy.Image  = global::Bau.Controls.Properties.Resources.Copy;
     this.mnuEditCopy.Name   = "mnuEditCopy";
     this.mnuEditCopy.Size   = new System.Drawing.Size(116, 22);
     this.mnuEditCopy.Text   = "&Copiar";
     this.mnuEditCopy.Click += new System.EventHandler(this.mnuEditCopy_Click);
     //
     // mnuEditCut
     //
     this.mnuEditCut.Image  = global::Bau.Controls.Properties.Resources.Cut;
     this.mnuEditCut.Name   = "mnuEditCut";
     this.mnuEditCut.Size   = new System.Drawing.Size(116, 22);
     this.mnuEditCut.Text   = "C&ortar";
     this.mnuEditCut.Click += new System.EventHandler(this.mnuEditCut_Click);
     //
     // mnuEditPaste
     //
     this.mnuEditPaste.Image  = global::Bau.Controls.Properties.Resources.Paste;
     this.mnuEditPaste.Name   = "mnuEditPaste";
     this.mnuEditPaste.Size   = new System.Drawing.Size(116, 22);
     this.mnuEditPaste.Text   = "&Pegar";
     this.mnuEditPaste.Click += new System.EventHandler(this.mnuEditPaste_Click);
     //
     // toolStripMenuItem1
     //
     this.toolStripMenuItem1.Name = "toolStripMenuItem1";
     this.toolStripMenuItem1.Size = new System.Drawing.Size(113, 6);
     //
     // mnuEditRemove
     //
     this.mnuEditRemove.Image  = global::Bau.Controls.Properties.Resources.Remove;
     this.mnuEditRemove.Name   = "mnuEditRemove";
     this.mnuEditRemove.Size   = new System.Drawing.Size(116, 22);
     this.mnuEditRemove.Text   = "&Eliminar";
     this.mnuEditRemove.Click += new System.EventHandler(this.mnuEditRemove_Click);
     //
     // RichTextBoxExtended
     //
     this.Controls.Add(this.panel1);
     this.Name = "RichTextBoxExtended";
     this.Size = new System.Drawing.Size(345, 339);
     this.tlbFormat.ResumeLayout(false);
     this.tlbFormat.PerformLayout();
     this.panel1.ResumeLayout(false);
     this.tableLayoutPanel1.ResumeLayout(false);
     this.tableLayoutPanel1.PerformLayout();
     this.ctxMenuEdit.ResumeLayout(false);
     this.ResumeLayout(false);
 }