請問大大怎樣改變checkbox display當這情況 |
缺席
|
hiyung
一般會員 發表:7 回覆:4 積分:2 註冊:2008-04-03 發送簡訊給我 |
我想當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 發送簡訊給我 |
|
hiyung
一般會員 發表:7 回覆:4 積分:2 註冊:2008-04-03 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |