請問如何讓讓物件屬性表中出現自己設定的屬性 |
尚未結案
|
yaoyao01tw
一般會員 ![]() ![]() 發表:28 回覆:17 積分:9 註冊:2003-01-28 發送簡訊給我 |
各位大大: 我想設計一個通用Baseform,而表單內有幾個自行定義的屬性,
如 fcanexec,fcanadd,fcandel,fcanedit,fcanprint:boolean;
我使用published區段內設定property canexec: boolean read fexec write fexec default true;我想讓這幾個屬性能直接在OBject Inspector可以觀看到
不知道要怎麼做到,我有看到類似的範例畫面,確實可以這樣搞,但是我一直不知道要如何實作,希望各位前輩,給予建議,或者這樣做法有哪些限制,
感謝您!
|
malanlk
尊榮會員 ![]() ![]() ![]() ![]() ![]() ![]() 發表:20 回覆:694 積分:577 註冊:2004-04-19 發送簡訊給我 |
|
l630521
資深會員 ![]() ![]() ![]() ![]() ![]() 發表:15 回覆:349 積分:372 註冊:2003-02-17 發送簡訊給我 |
請參考下面連結!
Creating Forms with Published Properties which show in the Object Inspector
http://www.mustangpeak.net/opentoolsape.htm Ian 發表人 - l630521 於 2005/10/07 17:04:57
|
sos_admin
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:121 回覆:697 積分:768 註冊:2003-07-23 發送簡訊給我 |
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Grids, DBGrids; type TBaseForm = class(TForm) private Fexec: Boolean; public published property canexec: Boolean read Fexec write Fexec default True; end; var BaseForm: TBaseForm; implementation {$R *.dfm} end.操作如下,即可以使用通用Baseform |
yaoyao01tw
一般會員 ![]() ![]() 發表:28 回覆:17 積分:9 註冊:2003-01-28 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |