在 sSkinListView1 的 OnSelectItem 事件中
我这样写 bsSkinEdit2.Text:= bsSkinListView1.Selected.SubItems.Strings[0]; 取得选中行第0列的值
程序运行后 可以选择一次 得到正确结果 但是点第二个时候 程序会崩溃procedure TForm2.bsSkinListView1SelectItem(Sender: TObject;
Item: TListItem; Selected: Boolean);
begin
if bsSkinListView1.Selected <> nil then
bsSkinEdit1.Text:=bsSkinListView1.Selected.Caption;
bsSkinEdit2.Text:= bsSkinListView1.Selected.SubItems.Strings[0];
end;不知道是什么问题! 报错是 Access violation at address 0050CE7E in module 'project1.exe'. read of address 00000008' Process stopped Use Step or Run to continue.
我这样写 bsSkinEdit2.Text:= bsSkinListView1.Selected.SubItems.Strings[0]; 取得选中行第0列的值
程序运行后 可以选择一次 得到正确结果 但是点第二个时候 程序会崩溃procedure TForm2.bsSkinListView1SelectItem(Sender: TObject;
Item: TListItem; Selected: Boolean);
begin
if bsSkinListView1.Selected <> nil then
bsSkinEdit1.Text:=bsSkinListView1.Selected.Caption;
bsSkinEdit2.Text:= bsSkinListView1.Selected.SubItems.Strings[0];
end;不知道是什么问题! 报错是 Access violation at address 0050CE7E in module 'project1.exe'. read of address 00000008' Process stopped Use Step or Run to continue.
解决方案 »
- delphi文件名的问题
- 在全球精确定位,是根据经纬度定位的吗?
- delphi做数据库方面的软件大家用线程处理没?
- 请问:在delphi里面怎样取得一个实数的小数部分! 多谢!
- 请问如何用treeview控件筛选数据库内容,在grid中显示。
- 是程序员就进来回答一下。
- 鼠标定位问题
- 我在动态库里创建一个窗体,但是在显示的时候在系统的状态条上会有新窗体显示出来,怎么解决?
- midas的简单问题!!!!!!!!!!!!!!!!!!!!
- 如何COPY记录:
- ???如何获得当前日期减一个月的值日期,如何获得当前时间减一个小时的时间,如何获得当前时间减一分钟的时间???
- RMB求购“赢三张”游戏DELPHI版代码
begin
bsSkinEdit1.Text:=bsSkinListView1.Selected.Caption;
bsSkinEdit2.Text:= bsSkinListView1.Selected.SubItems.Strings[0];
end;
Item: TListItem; Selected: Boolean);
begin
if bsSkinListView1.Selected <> nil then
begin
bsSkinEdit1.Text:=bsSkinListView1.Selected.Caption;
bsSkinEdit2.Text:= bsSkinListView1.Selected.SubItems.Strings[0];
end;
end;
begin
bsSkinEdit1.Text:=bsSkinListView1.Selected.Caption;
bsSkinEdit2.Text:= bsSkinListView1.Selected.SubItems[0]; // 最好判断一下COUNT>0?
end;