凌悟空  
人生就像一场回忆,生活和工作,生活:把它记下来,以便自己回忆和品位;工作:分享给大家,以便学习和交流...

2013年9月14日

摘要: 实例2: 本例功能: 1、获取 StringGrid 的行数、列数; 2、给单元赋值. 运行效果图: //示例代码://获取总列数,和总行数 procedure TForm12.Button1Click(Sender: TObject); var cCount,rCount: Integer; begin cCount :=StringGrid1.ColumnCount; {获取总列数} rCount := StringGrid1.RowCount; {获取总行数} Caption := Format('总列数: %d ,总行数: %d', [cC... 阅读全文
posted @ 2013-09-14 23:38 凌悟空 阅读(997) 评论(0) 推荐(0) 编辑
 
摘要: 实例1:初始化StirngGrid的首行和首列 // 主要代码部分: procedure TForm23.SetSGridTitle(Sender: TObject); var ColIndex, RowIndex: integer; begin //画第一行(标题栏) for colIndex := 1 to StringGrid1.ColumnCount do begin StringGrid1.Cells[colIndex, 0] := '列名' + Chr(ord('A') - 1 + colIndex); end; //画第一列(数字栏) String 阅读全文
posted @ 2013-09-14 23:34 凌悟空 阅读(807) 评论(0) 推荐(0) 编辑
 
摘要: 3、StringGrid之Event事件 property LiveBinding //把对象之间的属性绑定起来(XE2新增功能)property OnApplyStyleLookup: TNotifyEvent ...; //应用新样式property OnCanFocus: TCanFocusEvent ...; // SetFocus() 时property OnClick: TNotifyEvent ...; //单击时property OnDblClick: TNotifyEvent ...; //双击时property OnDragEnter: TDragEnterE... 阅读全文
posted @ 2013-09-14 23:32 凌悟空 阅读(1397) 评论(0) 推荐(0) 编辑
 
摘要: StringGrid之属性大全: Align: //确定组件在父类组件区内的对齐方式(alScale:随窗口 放大缩小) AlterRowBackGround: //设置用于绘制奇偶数行背景的颜色是否一样 Anchors: //当对象的容器的尺寸改变时,该对象的的位置怎么定位,一般其四个属性都设置为true: akLeft为True是控件与它的父控件的左边缘的距离不变 ; akTop为True是控件与它的父控件的上边缘的距离不变 ; akRight为True是控件与它的父控件的右边缘的距离不变 ; akBottom为True是控件与它的父控件的下边缘的距离不变。 Auto... 阅读全文
posted @ 2013-09-14 23:27 凌悟空 阅读(1150) 评论(0) 推荐(0) 编辑