線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1766
推到 Plurk!
推到 Facebook!

請問大大怎樣改變checkbox display當這情況

缺席
hiyung
一般會員


發表:7
回覆:4
積分:2
註冊:2008-04-03

發送簡訊給我
#1 引用回覆 回覆 發表時間:2008-04-03 12:40:16 IP:202.140.xxx.xxx 訂閱
我想當DirectoryListBox改變時將所有text box的file name放入個dynamic array of checkbox ,但每次個directory改紋時,如果之前個folder有的text file多過之後個folder會將之前的file name在下面display,請問各位大大怎樣可以slove這問題呢

procedure TForm1.DirectoryListBox1Change(Sender: TObject);
var NoOfPrefixFile : integer;
CaptureFileCheckBox : array of TCheckBox;
begin
CaptureFileCheckBox:=nil;
for i:= 0 to FileListBox1.Count-1 do
begin
if AnsiContainsText(FileListBox1.Items.Strings[i],'.txt') = true then begin
SetLength(CaptureFileCheckBox, NoOfPrefixFile);
CaptureFileCheckBox[NoOfPrefixFile] := TCheckBox.Create(self);
CaptureFileCheckBox[NoOfPrefixFile].Caption:=filePrefix[NoOfPrefixFile];
CaptureFileCheckBox[NoOfPrefixFile].Parent := self;
CaptureFileCheckBox[NoOfPrefixFile].Top := (i 2)*20;
CaptureFileCheckBox[NoOfPrefixFile].Left := 180;
NoOfPrefixFile:=NoOfPrefixFile 1;
end;
end;
end;

thanks 各位大大
max5020
資深會員


發表:29
回覆:277
積分:321
註冊:2003-06-04

發送簡訊給我
#2 引用回覆 回覆 發表時間:2008-04-15 17:11:39 IP:59.120.xxx.xxx 訂閱
筆誤不少, 看不出要問什麼 ???
hiyung
一般會員


發表:7
回覆:4
積分:2
註冊:2008-04-03

發送簡訊給我
#3 引用回覆 回覆 發表時間:2008-04-15 17:19:51 IP:202.140.xxx.xxx 訂閱
thanks for your reply
i solve the problem now
i know that the problem occuring when i forget to free dynamic array of checkbox
系統時間:2024-04-23 21:27:31
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!