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如何判断系统是否安装了flash插件

Delphi xe5下安卓开发技巧

Delphi 精确打印image画布

delpni-xe5-android sdk api 层次结构

Delphi mediaplayer1 设置音量

Delphi 如何获取窗口的图标

Delphi idhttp组件+idhttpserver组件实现文件下载服务

Delphi实现百度地图经纬度与地址互转

Delphi 实现数据库连接封装到dll

Delphi瞬间消除无用托盘图标(刷新托盘)

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



打赏

取消

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

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

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

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

评论

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

    暂无评论...