回复 1楼刘君的帖子
可以的。
而且既可以通过spread的设计器来实现,也可以通过代码实现。
代码参考:
- FarPoint.Win.Spread.CellType.RichTextCellType rtf = new FarPoint.Win.Spread.CellType.RichTextCellType();
- rtf.WordWrap = true;
- rtf.Multiline = true;
- fpSpread1.ActiveSheet.Cells[0, 0].CellType = rtf;
- fpSpread1.ActiveSheet.Columns[0].Width = 300;
- fpSpread1.ActiveSheet.Rows[0].Height = 150;
- fpSpread1.ActiveSheet.Cells[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}";
复制代码
具体的有关设置RichTextCell的内容,可以参考产品文档的:Setting a Rich TextCell章节。
产品文档索引:Spread Windows Forms 8.0 Product Documentation > Developer's Guide > Customizing Interaction with Cell Types > Working with Graphical Cell Types > Setting a Rich Text Cell
Spread WinForm
文档地址:
32位系统:C:\Program Files\ComponentOne\Spread Studio 8\Docs\Windows Forms
64位系统:C:\Program Files (x86)\ComponentOne\Spread Studio 8\Docs\Windows |