delphi StringGrid行列的增加和删除


本文整理自网络,侵删。

 
type
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;
――――――――――――――――

原文链接:https://blog.csdn.net/ozhy111/article/details/102821053

相关阅读 >>

Delphi webbrowser.oleobject属性

Delphi用邻域平均法对图像进行平滑处理

Delphi excel操作,写了个adodataset转excel的函数

Delphi tms web core js callproc

Delphi 在目录后面加上一个 "\"

Delphi 判断文件名是否有效

Delphi 强迫将半型英数字转换成全型英数字

Delphi 用updateresource修改exe文件图标(已修正)

Delphi与正则表达式

Delphi 网卡mac地址随机生成函数

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...