在安卓里,Delphi XE5, 用Add('123456')給ListBox添加專案時,兩三秒后,程式會例外關閉的,有誰遇到過這樣的問題,知道是什么原因的請說一聲?謝謝了。前幾天在用SetFocus給Edit控制元件設定焦點,也出現類似的情況。代碼如下:
var
id,k:integer;
ss:string;
begin
if ListBox1.Items.Count>0 then
begin
if ListBox1.Selected<>nil then
begin
id:=ListBox1.Selected.Index;
ss:='111111';
ListBox1.Items.Insert(id,ss);
end
else
begin
ss:='111111';
k:=ListBox1.Items.add(ss);
end;
end
else
begin
ss:='111111';
k:=ListBox1.Items.add(ss);
end;
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/118781.html
標籤:非技術區
上一篇:套接字出錯如何解決??
