GrapeCity MultiRow Windows Forms Documentation
RichTextBoxCell Constructor
Example 


Initializes a new instance of the RichTextBoxCell class.
Syntax
Public Function New()
Dim instance As New RichTextBoxCell()
public RichTextBoxCell()
Example
This example creates a rich text box cell.
GrapeCity.Win.MultiRow.RichTextBoxCell rich = new GrapeCity.Win.MultiRow.RichTextBoxCell();
GrapeCity.Win.MultiRow.TextBoxCell text2 = new GrapeCity.Win.MultiRow.TextBoxCell();            
text2.Name = "text2";
GrapeCity.Win.MultiRow.Template template1 = GrapeCity.Win.MultiRow.Template.CreateGridTemplate(new GrapeCity.Win.MultiRow.Cell[] { rich, text2 }, 160, GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.ColumnHeader | GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeaderAutoNumber);
template1.ColumnHeaders[0].Cells[0].Value = "Column1";
template1.ColumnHeaders[0].Cells[1].Value = "Column2";
gcMultiRow1.Template = template1;
gcMultiRow1.RowCount = 3;
gcMultiRow1[0, 0].Value = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033
{\fonttbl{\f0\fscript\fprq2\fcharset0 Comic Sans MS;}
{\f1\froman\fprq2\fcharset0 Times New Roman;}
{\f2\fswiss\fcharset0 Arial;}}{\colortbl ;\red128
\green0\blue128;\red0\green255\blue255;\red255\green0\
blue0;\red0\green255\blue0;\red0\green0\blue255;}
\viewkind4\uc1\pard\cf1\b\f0\fs24 Testing\cf2\b0\fs28 \cf3
\f1\fs40 1... \cf4\i 2... \cf5\ul\i0 3...\cf0\f2\fs20\par}";
Dim rich As New GrapeCity.Win.MultiRow.RichTextBoxCell()
Dim text2 As New GrapeCity.Win.MultiRow.TextBoxCell()
text2.Name = "text2"
Dim template1 As GrapeCity.Win.MultiRow.Template = GrapeCity.Win.MultiRow.Template.CreateGridTemplate(New GrapeCity.Win.MultiRow.Cell() {rich, text2}, 160, GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.ColumnHeader Or GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeaderAutoNumber)
template1.ColumnHeaders(0).Cells(0).Value = "Column1"
template1.ColumnHeaders(0).Cells(1).Value = "Column2"
GcMultiRow1.Template = template1
GcMultiRow1.RowCount = 3
GcMultiRow1(0, 0).Value = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fscript\fprq2\fcharset0 Comic Sans MS;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fcharset0 Arial;}}{\colortbl ;\red128\green0\blue128;\red0\green255\blue255;\red255\green0\blue0;\red0\green255\blue0;\red0\green0\blue255;}\viewkind4\uc1\pard\cf1\b\f0\fs24 Testing\cf2\b0\fs28 \cf3\f1\fs40 1... \cf4\i 2... \cf5\ul\i0 3...\cf0\f2\fs20\par}"
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

RichTextBoxCell Class
RichTextBoxCell Members

 

 


Copyright © GrapeCity, inc. All rights reserved.