2011年7月26日

如何删除动态数组的指定元素

摘要: 如何删除动态数组的指定元素type TArr = array of TPoint; {把数组先定义成一个类型会方便许多, 这里仅用 TPoint 测试}{删除动态数组指定元素的过程: 参数 arr 是数组名, 参数 Index 是要删除的索引}procedure DeleteArrItem(var arr: TArr; Index: Integer);var Count: Cardinal;begin Count := Length(arr); if (Count = 0) or (Index < 0) or (Index >= Count) then Exit; Move(arr 阅读全文

posted @ 2011-07-26 15:04 mytina 阅读(458) 评论(0) 推荐(0)

万老师讲:如何删除动态数组的指定元素

摘要: 如何删除动态数组的指定元素type TArr = array of TPoint; {把数组先定义成一个类型会方便许多, 这里仅用 TPoint 测试}{删除动态数组指定元素的过程: 参数 arr 是数组名, 参数 Index 是要删除的索引}procedure DeleteArrItem(var arr: TArr; Index: Integer);var Count: Cardinal;begin Count := Length(arr); if (Count = 0) or (Index < 0) or (Index >= Count) then Exit; Move(arr 阅读全文

posted @ 2011-07-26 14:48 mytina 阅读(218) 评论(0) 推荐(0)

万老师讲:如何让TreeView 的列表项携带数据、并读出或删除这个数据

摘要: 准备工作:1、在空白窗体上添加 TreeView1 和 Button12、激活窗体的 OnCreate 事件, 激活 TreeView 的 OnDblClick 事件全部代码如下:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, StdCtrls;type TForm1 = class(TForm) TreeView1: TTreeView; Button1: TButton; procedure FormC 阅读全文

posted @ 2011-07-26 13:49 mytina 阅读(339) 评论(0) 推荐(0)

导航