Has anyone noticed this problem.
Write code to create a new page on a notebook and set the pageindex to the new page. I get a "Contrl has no parent" error and it freezes on me.
Anyone else get this?
Shane

Mailing lists / lazarus / 2000-01
9 messages · 5 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Has anyone noticed this problem.
Write code to create a new page on a notebook and set the pageindex to the new page. I get a "Contrl has no parent" error and it freezes on me.
Anyone else get this?
Shane
Isn't it so that it is complies with Delphi's way of doing things?? I know that with the…
you wroteIsn't it so that it is complies with Delphi's way of doing things?? I know that with the VCL under Delphi you have to do the same thing. I'm sure there's a good reason for it...
Look in the archives for a discussion about owners and parents. Most of the time they are the same, but there is big difference in the meaning of both.
Marc
Isn't it so that it is complies with Delphi's way of doing things?? I know that with the VCL under Delphi you have to do the same thing. I'm sure there's a good reason for it...
--- Stefan Hille wrote:
[...snip...]
---------------------------------------------------------
_________________________________________________________________
__________________________________________________ Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com
Has anyone noticed this problem. Write code to create a new page on a notebook and set…
+ From: Shane Miller
+ Has anyone noticed this problem.
+ Write code to create a new page on a notebook and set the
+ pageindex to the new page. I get a "Contrl has no parent"
+ error and it freezes on me.
+
+ Anyone else get this?
Can you give an example. I haven't seen this before.
Marc
Isn't it so that it is complies with Delphi's way of doing things?? I know that with the…
You're right, just looked at the delphi-docs. But in fact I've already created components in Delphi without setting the parent property. Strange...
bye,
Stefan
+ -----Original Message-----
+ From: Stefan Hille
+
+ On Wed, Jan 05, 2000 at 01:50:58PM -0800, Kevin Berry wrote:
+ > Isn't it so that it is complies with Delphi's way of
+ > doing things?? I know that with the VCL under Delphi
+ > you have to do the same thing. I'm sure there's a
+ > good reason for it...
+ >
+ You're right, just looked at the delphi-docs. But in fact I've already
+ created components in Delphi without setting the parent property.
+ Strange...
Some components don't require a parent, lately I ran into one and fixed this in Lazarus, however I can't remember which one. As a general rule you can say that every GUI component has to have a parent (except forms). Most of the time if you are creating components in Delphi you use the IDE to place them on a form. The parent is then set by the IDE (so you dont have to set it yourself).
Marc
Has anyone noticed this problem. Write code to create a new page on a notebook and set…
Not directly, but when I updated some examples during the last week I noticed that parent is no longer set automatically to AOwner during Create. So for every object you have to call
myObject := TSomeObject.Create (self);
myObject.Parent := self;I always wanted to ask why this new behaviour has been introduced but just forgot about that.
bye,
Stefan
Look in the archives for a discussion about owners and parents. Most of the time they are…
er..... for most graphical controls the owner is always the form, but the parent is the control they were placed on (the panel, the notebook page, the toolbar etc etc)
Sam
That makes sense.
--- Samuel Liddicott wrote:
[...snip...]
__________________________________________________ Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com