TStringProperty 的問題 |
缺席
|
Yomigae
一般會員 發表:2 回覆:2 積分:0 註冊:2002-06-14 發送簡訊給我 |
Dear all: 這兒有一段設計元件的程式,我開放了一個 aString 的屬性,本來是預期在 Object Inspector 裡連按 aString 的屬性時會開起對話視窗,可是卻沒有,我覺得可能是呼叫 RegisterPropertyEditor 時出現了問題,我是用 BCB6 編譯,希望有人能幫忙解惑,謝謝。
//--------------------------------------------------------- class PACKAGE TSxStringProperty: public TStringProperty { public: virtual TPropertyAttributes __fastcall GetAttributes() { return TPropertyAttributes()發表人 - yomigae 於 2003/10/06 14:20:30 發表人 - Gemi0305 於 2003/10/06 15:30:57 |
Yomigae
一般會員 發表:2 回覆:2 積分:0 註冊:2002-06-14 發送簡訊給我 |
已經在網路上找到答案了,辛苦各位了。 In addition to this, registering AnsiString property editors is not straight
forward. The easiest ways to do this is in your Register procedure get the
TypeInfo from the property itself since you can't get it from the AnsiString
class. Something like TPropInfo *PropInfo = ::GetPropInfo(__typeinfo(TMyComponent), "MyString");
RegisterPropertyEditor(*PropInfo->PropType, __classid(TMyComponent),
"MyString", __classid(TMyStringPropEditor));
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |