全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:989
推到 Plurk!
推到 Facebook!

Use comboBox to show data within the same field?

尚未結案
Vashee
初階會員


發表:38
回覆:87
積分:25
註冊:2003-03-31

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-05-11 16:25:07 IP:217.36.xxx.xxx 未訂閱
Say in a field called 'Subject' contain five 5 records: Maths, English, Product Design, Business Study, and Art How can I use a combobox to show all these records and let user select each one? if this is impossible, is there an alternative appoach? Thanks
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-05-11 17:10:31 IP:202.39.xxx.xxx 未訂閱
1.加入 TComboBox 的 Items 屬性中 ComboBox1.Items.Add('Maths'); ComboBox1.Items.Add('English'); ... 2.使用者選取了哪個: ComboBox1.Items[ComboBox1.ItemIndex];    --- 每個人都是一本書
Vashee
初階會員


發表:38
回覆:87
積分:25
註冊:2003-03-31

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-05-11 17:28:28 IP:217.36.xxx.xxx 未訂閱
don't understand this one: 2.使用者選取了哪個: ComboBox1.Items[ComboBox1.ItemIndex]; <---
Vashee
初階會員


發表:38
回覆:87
積分:25
註冊:2003-03-31

發送簡訊給我
#4 引用回覆 回覆 發表時間:2003-05-11 17:31:15 IP:217.36.xxx.xxx 未訂閱
the combobox show the data i need, but how can I relate it to the table? say the table name is : tSubject (ADOTable)
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#5 引用回覆 回覆 發表時間:2003-05-12 08:40:16 IP:202.39.xxx.xxx 未訂閱
1.ComboBox1.ItemIndex; 指現在 ComboBox1 所顯示的 Item 的 Index 2.不太明白您的意思?還是您要用 TDBComboBox?    --- 每個人都是一本書
Vashee
初階會員


發表:38
回覆:87
積分:25
註冊:2003-03-31

發送簡訊給我
#6 引用回覆 回覆 發表時間:2003-05-13 23:46:22 IP:217.35.xxx.xxx 未訂閱
should i use a tbcombox then?? because the data avaliable in the combox has to be related to a table
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#7 引用回覆 回覆 發表時間:2003-05-14 06:42:21 IP:202.39.xxx.xxx 未訂閱
您要怎麼個 related 法? 可以說明清楚一點嗎?    --- 每個人都是一本書
Vashee
初階會員


發表:38
回覆:87
積分:25
註冊:2003-03-31

發送簡訊給我
#8 引用回覆 回覆 發表時間:2003-05-15 05:53:06 IP:81.132.xxx.xxx 未訂閱
that means it shows whatever options is avaliable in that field column... ex. Name _______ Frankie Jacky Mary Then under the dbcombox, it should show Frankie, Jacky and Mary options as well. If an extra record is added under that field, the dbcombox should be update at the same time. can i do that?
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#9 引用回覆 回覆 發表時間:2003-05-15 07:31:59 IP:202.39.xxx.xxx 未訂閱
您得手動把該 Table 內的 record 加到 ComboBox 內.    --- 每個人都是一本書
系統時間:2024-07-01 19:47:15
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!