Board index » delphi » How To: Expose new published properties of TForm derivative in Object Inspector
Tom Smith
![]() Delphi Developer |
Sun, 12 Jan 2003 03:00:00 GMT
How To: Expose new published properties of TForm derivative in Object Inspector
I recently found a piece of code, a derivative of TForm, that needed
adapting to Delphi 5. During this process I have added a couple of published properties along with the original published properties. Upon review of the finished product, I notice that I can't see any of the published properties in the Object Inspector. Why? And, more importantly, how can I overcome this? Reviewing an article on TFrames, the author made mention of the fact that the same can be said of TFrame derivatives as well. He also said that to overcome this deficiency this process was not trivial, implying that it is both complex and *possible*. Complex procedures never scared me so...how do I do this? I don't have my old Delphi versions anymore but I belive that this is a recent "innovation" - the code that I am adapting was written with the presumption that the properties would show up so I presume that Borland added a "feature" that now makes this process very difficult <sigh>. Secondly, presuming that I get the answers I need, how does one make the new form available as an alternative to the standard TForm? There is a button for Create New Form and the standard New brings up the Repository - is that where the new form needs to go? Right now I am just editing the code for a standard form and changing the ancestry - this seems to be both a little crude and the wrong way to do this, although it has the distinct result of *working* so I don't complain too much...<g>. Also, how does one petitiion Borland to change a piece of code? When going thru the fixit process, I first started by changing the ancestor from TForm to TCustomForm (I don't want all the MDI code), which seemed to be perfectly reasonable to me. Upon discovering that my form was never created (the program just quits) I went digging thru the VCL and lo and behold, there in the CreateForm method, the code looks for a TForm, not a TCustomForm which requires all decendants to have all the MDI stuff and what not when it may not be needed. So, how do I convince Borland to change their code from looking for TForm to looking for TCustomForm? Thanx! |