Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Control has no parent Window -at Design Time?

54 views
Skip to first unread message

nic.al...@gmail.com

unread,
Apr 3, 2006, 7:27:00 AM4/3/06
to
I have descended a TreeView component from a TCustomTreeView. I have
not overriden the create method. If I merely place the new TreeView
on a form, and try to save the project, I get the message "Component
"TreeViewxxx" has no parent window. This is without even trying to
run the application. If I run it, I get the same message when the
Treeview component gets to it's destroy method and tries to traverse
the tree nodes. I have tried setting the control's parent property to
the panel that contains it, (which is a standard Delphi panel, so it
should have it's parent property set) but to no avail. Can anyone
help?

nic.al...@gmail.com

unread,
Apr 3, 2006, 8:31:36 AM4/3/06
to
Part of the problem seems to be caused because the panel that is the
paretn TWinControl of the Tree component is getting destroyed before
the Tree Component, and isn't calling the Tree's destroy method. By
the time the Tree's destroy is called, it's parent property is nil. :(

0 new messages