DataInspector的DisplayAsCheckbox屬性 |
缺席
|
lazybones1983
一般會員 發表:6 回覆:7 積分:2 註冊:2011-05-25 發送簡訊給我 |
|
lazybones1983
一般會員 發表:6 回覆:7 積分:2 註冊:2011-05-25 發送簡訊給我 |
後來看了Help跟找了一下其他網頁, 終於了解help中的說明的意思
property DisplayAsCheckBox: Boolean; Description Set to True to display the item as a checkbox. The first two strings in the items property are used as the checked and unchecked values. To initialize the checkbox, set the item EditText property. 所以要在PickList中增加2個Item, 只要符合item中第1個string, checkbox就會是checked , 符合第2個string即顯示unchecked 以下code就是增加 ' ' 跟 '-' 2個item, 並將初始值設為 ' ', 所以執行起來時, 會看到checkbox是checked [code delphi] with wwDataInspector1.Items.Add do begin PickList.DisplayAsCheckbox := True; PickList.Items.Add(' '); PickList.Items.Add('-'); EditText := ' '; end; [/code] |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |