 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
raulmola Guest
|
Posted: Thu Jan 04, 2007 10:53 pm Post subject: Avoiding "Control has no parent window" in a general way |
|
|
I'm writing a simple TreeView inherited form TCustomTreeView. Here is
the constructor
__fastcall TMyTreeView::TMyTreeView(TComponent* Owner)
: TCustomTreeView(Owner)
{
TFont * mf = new TMyFont();
Font->Assign(mf);
delete mf;
}
At design time the component is not created due to the message "Control
has no parent window"
This is not the first time i found this message and i wanted to know if
there is a common, a general way, to avoid this message. How do you
usually accomplish this ?.
In particular, i want my TreeView has an specific font when it's
dropped over a form. How could i accomplish this?
I think the perfect place to do this is the constructor because, in
fact, you are initializing the Font, but there is internal code that
prevents it. This shouldn't be so tricky. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|