Farpoint Spread For Windows Forms 5.0 使用指南 中文(4)
FpSpread1.Sheets(0).Columns(7).Width = 125
从例子入门:创建Checkbook Register 8
产品网站 http://www.grapecity.cn/tools 技术支持论坛http://gcdn.grapecity.com
示例:设置数字单元格类型到Check #列 示例:设置日期单元格类型到Date 列
[C#]
// 把Check #列的单元格类型设置成数字
FarPoint.Win.Spread.CellType.NumberCellType objNumCell = new FarPoint.Win.Spread.CellType.NumberCellType(); objNumCell.DecimalPlaces = 0; objNumCell.MinimumValue = 1; objNumCell.MaximumValue = 9999; objNumCell.ShowSeparator = false;
fpSpread1.Sheets[0].Columns[0].CellType = objNumCell;
[Visual Basic]
'把Check #列的单元格类型设置成数字
Dim objNumCell As New FarPoint.Win.Spread.CellType.NumberCellType() objNumCell.DecimalPlaces = 0 objNumCell.MinimumValue = 1 objNumCell.MaximumValue = 9999 objNumCell.ShowSeparator = False
FpSpread1.Sheets(0).Columns(0).CellType = objNumCell
[C#]
// 把Date 列的单元格类型设置成日期
FarPoint.Win.Spread.CellType.DateTimeCellType objDateCell = new
FarPoint.Win.Spread.CellType.DateTimeCellType(); objDateCell.DateTimeFormat =
FarPoint.Win.Spread.CellType.DateTimeFormat.ShortDate; fpSpread1.Sheets[0].Columns[1].CellType = objDateCell;
[Visual Basic]
'把Date 列的单元格类型设置成日期
Dim objDateCell As New FarPoint.Win.Spread.CellType.DateTimeCellType() objDateCell.DateTimeFormat =
FarPoint.Win.Spread.CellType.DateTimeFormat.ShortDate FpSpread1.Sheets(0).Columns(1).CellType = objDateCell
从例子入门:创建Checkbook Register 9
产品网站 http://www.grapecity.cn/tools 技术支持论坛http://gcdn.grapecity.com
示例:设置文本单元格类型到Description 列
示例:设置单选框单元格类型到“Tax?” 和“Cleared?”列
[C#]
// 把Description 列单元格类型设置成文本类型
FarPoint.Win.Spread.CellType.TextCellType objTextCell = new FarPoint.Win.Spread.CellType.TextCellType(); objTextCell.MaxLength = 100;
fpSpread1.Sheets[0].Columns[2].CellType = objTextCell;
[Visual Basic]
'把Description 列单元格类型设置成文本类型
Dim objTextCell As New FarPoint.Win.Spread.CellType.TextCellType() objTextCell.MaxLength = 100
FpSpread1.Sheets(0).Columns(2).CellType = objTextCell
[C#]
//把“Tax? ” 和“ Cleared?” 列的单元格类型设置成单选框类型 FarPoint.Win.Spread.CellType.CheckBoxCellType objCheckCell = new FarPoint.Win.Spread.CellType.CheckBoxCellType(); objCheckCell.ThreeState = false;
fpSpread1.Sheets[0].Columns[3].CellType = objCheckCell; fpSpread1.Sheets[0].Columns[4].CellType = objCheckCell;
[Visual Basic]
'把“Tax? ”和“ Cleared? ”列的单元格类型设置成单选框类型
Dim objCheckCell As New FarPoint.Win.Spread.CellType.CheckBoxCellType() objCheckCell.ThreeState = False
FpSpread1.Sheets(0).Columns(3).CellType = objCheckCell FpSpread1.Sheets(0).Columns(4).CellType = objCheckCell
从例子入门:创建Checkbook Register 10
产品网站 http://www.grapecity.cn/tools 技术支持论坛http://gcdn.grapecity.com
示例:设置货币框单元格类型到Debit,Credit 和Balance 列
保存您的工程然后从“编译”菜单中选择“开始”来运行您的工程。存储工程,选择“编译”菜单
“开始”运行程序。 您的窗体将会如下图:
1.4 添加公式
您的工程现在看起来像一个支票登记薄。但是,在您登记的时候它不会自动计算收支平衡。 下列步骤通过Spread 提供的公式功能来自动计算收支平衡。
[C#]
// 把Debit, Credit 和 Balance 列的单元格类型设置成货币类型
FarPoint.Win.Spread.CellType.CurrencyCellType objCurrCell = new FarPoint.Win.Spread.CellType.CurrencyCellType();
objCurrCell.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes; objCurrCell.NegativeRed = true; objCurrCell.FixedPoint = true;
fpSpread1.Sheets[0].Columns[5].CellType = objCurrCell; fpSpread1.Sheets[0].Columns[6].CellType = objCurrCell; fpSpread1.Sheets[0].Columns[7].CellType = objCurrCell;
[Visual Basic]
'把Debit, Credit 和Balance 列的单元格类型设置成货币类型
Dim objCurrCell As New FarPoint.Win.Spread.CellType.CurrencyCellType() objCurrCell.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes objCurrCell.NegativeRed = True objCurrCell.FixedPoint = True …… 此处隐藏:1547字,全部文档内容请下载后查看。喜欢就下载吧 ……
相关推荐:
- [实用模板]第八章:法国“新浪潮”与“左岸派”
- [实用模板]2021年北京上半年临床医学检验技师生物
- [实用模板]SAP GUI 7.10客户端安装配置文档
- [实用模板]2001年临床执业医师资格考试综合笔试试
- [实用模板]36机场工作实用英语词汇总结
- [实用模板](一)社会保险稽核通知书
- [实用模板]安全教育主题班会材料
- [实用模板]濉溪县春季呼吸道传染病防控应急演练方
- [实用模板]长沙房地产市场周报(1.30-2.3)
- [实用模板]六年级数学上册典中点 - 图文
- [实用模板]C程序设计(红皮书)习题官方参考答案
- [实用模板]中国证监会第一届创业板发行审核委员会
- [实用模板]桥梁工程复习题
- [实用模板]2011学而思数学及答案
- [实用模板]初中病句修改专项练习
- [实用模板]监理学习知识1 - 图文
- [实用模板]小机灵杯四年级试题
- [实用模板]国贸专业毕业论文模板
- [实用模板]教育学概论考试练习题-判断题4
- [实用模板]2015届高考英语一轮复习精品资料(译林
- 00Nkmhe_市场营销学工商管理_电子商务_
- 事业单位考试法律常识
- 诚信教育实施方案
- 吉大小天鹅食品安全检测箱方案(高中低
- 房地产销售培训资料
- 高一地理必修1复习提纲
- 新概念英语第二册lesson_1_练习题
- 证券公司内部培训资料
- 小学英语时间介词专项练习
- 新世纪英语专业综合教程(第二版)第1册U
- 【新课标】浙教版最新2018年八年级数学
- 工程建设管理纲要
- 外研版 必修一Module 4 A Social Surve
- Adobe认证考试 AE复习资料
- 基于H.264AVC与AVS标准的帧内预测技术
- 《食品检验机构资质认定管理办法》(质
- ABB变频器培训课件
- (完整版)小学说明文阅读练习题及答案
- 深思洛克(SenseLock) 深思IV,深思4,深
- 弟子规全文带拼音




