stringgrid 控件中 添加 ,删除,一行怎么用代码实现
解决方案 »
- 如果制作透明大按钮
- 难住了???输出Word报表问题,请大家帮忙!!!
- 请问一下谁有比较的源码下载呀?
- 程序在运行期出现的一个特别奇怪的问题﹐望各位大虾关注...急......
- 男朋友打网络游戏,近乎疯狂,我该怎么办。。。。。。。
- delphi 怎样连接oracle数据库
- 急!取IE变量值问题,哪位做过的情帮忙回答,谢谢!
- 能否声明一个数组,数据类型是自定义的类?
- Shiori Player 测试版出炉
- 64位win7,Delphi 10 Seattle 下安装uniGUI组件失败,请指教。
- Visual Graph图形控件为什么比较贵
- 去年写了一个专门打印DBGRID和STRINGGRID的数据模块,还没做成控件,相信能解决大家的问题,有兴趣的可以看看功能简介
删 StringGrid.rowcount := StringGrid.rowcount-1
TExCell = class(TStringGrid)
public
procedure DeleteRow(ARow: Longint);
procedure DeleteColumn(ACol: Longint);
procedure InsertRow(ARow: LongInt);
procedure InsertColumn(ACol: LongInt);
end;
procedure TExCell.InsertColumn(ACol: Integer);
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;