Board index » cppbuilder » Why not derive component from TCustomFrame?

Why not derive component from TCustomFrame?


2007-08-13 11:16:18 PM
cppbuilder79
Hi,
In BDS2006 the wizard for Add New|Other|Component lists all the VCL classes
that components can be derived from.
I don't understand why some classes (say, like TFrame or TCustomFrame)
cannot be used to derive a component from, whilst TCustomFrame's immediate
parent - TScrollingWindow - can actually be used (all descendant from
TComponent - TControl - TWinControl - etc...).
If I look at the class declarations of TCustomFrame or TFrame in Forms.hpp
it all looks pretty standard. What specifically is the issue in TFrame or
TCustomFrame?
TIA,
Ettienne
 
 

Re:Why not derive component from TCustomFrame?

"Ettienne Gilbert" < XXXX@XXXXX.COM >wrote in message
Quote
I don't understand why some classes (say, like TFrame or
TCustomFrame) cannot be used to derive a component from
There is a separate wizard for creating new frame classes. Frames have
additional handling that components do not, so they are managed differently.
Quote
whilst TCustomFrame's immediate parent - TScrollingWindow -
can actually be used
Those are not frames. There is no reason to prevent deriving from those
classes.
Quote
If I look at the class declarations of TCustomFrame or TFrame
in Forms.hpp it all looks pretty standard. What specifically is
the issue in TFrame or TCustomFrame?
The IDE's management of them is different.
Gambit
 

Re:Why not derive component from TCustomFrame?

"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote

There is a separate wizard for creating new frame classes. [..]
Hi Remy,
Thanks for response and info.
I've added a sample Frame to my BPL Package, and I can use it "sort of like
a component".
But it obviously adds the Frame unit to the project as well when you use
the Frame (i.e. drop the Frame from the Palette onto the Form), which is not
what I really want (the user of the BPL might find it confusing as this
behaviour differs from the other components in the Package).
I think I'll just continue to embed the Frame inside a component - that
(nicely) removes the necessity for the Frame unit to be added to the project
when it is used (as part of the component).
Thanks again for the info.
Ettienne
 

{smallsort}