直接改给ROWCOUNT赋值,就可更改行数
解决方案 »
- dbgrideh下接设置
- 化验室信息系统数据库设计-请教
- 从第一行自动计算到最后一行
- 求助!启动AUTOCAD的问题
- 急急急,菜鸟字符串问题,在线等待
- 利用TQuery编辑数据问题
- 为什么delphi5的安装盘拷到硬盘上就装不了了??
- 请教用TDCOMConnection连接Appserver,在调用AppServer中函数是遇到的问题!!
- ***创建Delphi共享联盟*****
- 请教各位,怎样通过函数名得到程序包中函数的函数指针?类似DLL的GetProcAddress()
- 如何编写Person web server 程序
- 如何用Delphi实现Modem的语音通讯及文件传输功能?十万火急!
begin
ColCount :=ColCount +1;
MoveColumn(ColCount-1, ACol);
end;procedure TExCell.InsertRow(ARow: Integer);
begin
RowCount :=RowCount +1;
MoveRow(RowCount-1, ARow);
end;procedure TExCell.DeleteColumn(ACol: Longint);
begin
MoveColumn(ACol, ColCount -1);
ColCount := ColCount - 1;
end;procedure TExCell.DeleteRow(ARow: Longint);
begin
MoveRow(ARow, RowCount - 1);
RowCount := RowCount - 1;
end;
就象madfish 那样说的,你自己建一个组件继承自TStringGrid ,
就这么改两下就行了。
你需要创建自己的控件,
TExCell = class(TStringGrid)
public
procedure DeleteRow(ARow: Longint);
procedure DeleteColumn(ACol: Longint);
procedure InsertRow(ARow: LongInt);
procedure InsertColumn(ACol: LongInt);
end;