procedure TForm1.Button1Click(Sender: TObject); begin if listbox1.items.text='' then begin showmessage('listbox1不能为空'); abort; end; end;
procedure TForm1.ListView1CustomDrawItem(Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean); begin if item.Caption='' then begin showmessage('listview1的caption空了'); exit; end;
OnInsertif Item.caption = '' then Raise Exception.create('Error');
begin
if listbox1.items.text='' then
begin
showmessage('listbox1不能为空');
abort;
end;
end;
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
if item.Caption='' then
begin
showmessage('listview1的caption空了');
exit;
end;
Raise Exception.create('Error');