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 xe下文件转base64编码函数

Delphi showmodal与show的区别

Delphi 10.3.1新的变量的声明方法

Delphi xe5下安卓开发技巧

Delphi 十六进制字符串转化成字符串输出hextostr strtohex(Delphi版、c#版)

Delphi 创建大窗口

Delphi 显示简单图形

Delphi paramcount、paramstr

文件占坑对付云安全

Delphi切换指定窗口到最前并获得焦点

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



打赏

取消

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

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

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

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

评论

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