listbox 与 stringGrid 的运用 |
尚未結案
|
lhh
一般會員 發表:16 回覆:21 積分:7 註冊:2004-11-14 發送簡訊給我 |
假设listbox1 中有100个integer 0..99, stringGrid colCount =2,
rowCount1=101, [1,1]..[1,101] 中有100个integer 也是0..99。
stringGrid1.heigh := 200
stringGrid1.Width := 200 请问有什么方法当我double click listbox中任何一个integer会在stringGrid中找到相对应的integer并且显示在200×200 的stringGrid中呢? Thanx so much!
|
hagar
版主 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
|
lhh
一般會員 發表:16 回覆:21 積分:7 註冊:2004-11-14 發送簡訊給我 |
|
hagar
版主 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
是這樣嗎(前面兩題)?
procedure TForm1.ListBox1.Click(Sender: TObject); var sNo: string; iNo, iCol, iRow: integer; begin iNo := ListBox1.ItemIndex; sNo := ListBox1.Items[ListBox1.ItemIndex]; stringGrid.Col := 1; stringGrid.Row := iNo 1; end;還有最後一點要顯示 200 x 200 的 StringGrid 是什麼意思? 顯示在 Cell 還是? 是有兩個 TStringGrid 嗎? 200 x 200 的 Dialog 是? -- 世界上為什麼會有貧窮?因為大部分人都不想和別人分享自己所擁有的 -- Mother Teresa |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |