 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Clayton L. Wilson Guest
|
Posted: Wed Aug 06, 2003 12:45 am Post subject: refresh doesn't work |
|
|
I have written a compound component, that when I resize it on the form, I
need to resize the subcomponents. I placed my code under Refresh and
Repaint, but program execution never seems to go there. The code works fine,
I just don't know where to place it in my component. Can someone out there
tell me where to place it. Thanks a bunch.
--
Clayton L. Wilson
|
|
| Back to top |
|
 |
Paul Nicholls Guest
|
Posted: Wed Aug 06, 2003 1:01 am Post subject: Re: refresh doesn't work |
|
|
You could try overriding the compound component's SetBounds method and place
it there...
"Clayton L. Wilson" <claytonwilson (AT) ev1 (DOT) net> wrote
| Quote: | I have written a compound component, that when I resize it on the form, I
need to resize the subcomponents. I placed my code under Refresh and
Repaint, but program execution never seems to go there. The code works
fine,
I just don't know where to place it in my component. Can someone out there
tell me where to place it. Thanks a bunch.
--
Clayton L. Wilson
|
|
|
| Back to top |
|
 |
Clayton L. Wilson Guest
|
Posted: Wed Aug 06, 2003 1:37 am Post subject: Re: refresh doesn't work |
|
|
I tried that, but I keep getting the error:
Control '' has no parent window.
Am I doing something wrong for Refresh not to be called?
"Paul Nicholls" <paul-nicholls (AT) hotmail (DOT) com> wrote
| Quote: | You could try overriding the compound component's SetBounds method and
place
it there...
"Clayton L. Wilson" <claytonwilson (AT) ev1 (DOT) net> wrote in message
news:3f30500a (AT) newsgroups (DOT) borland.com...
I have written a compound component, that when I resize it on the form,
I
need to resize the subcomponents. I placed my code under Refresh and
Repaint, but program execution never seems to go there. The code works
fine,
I just don't know where to place it in my component. Can someone out
there
tell me where to place it. Thanks a bunch.
--
Clayton L. Wilson
|
|
|
| Back to top |
|
 |
Clayton L. Wilson Guest
|
Posted: Wed Aug 06, 2003 2:10 am Post subject: Re: refresh doesn't work |
|
|
I got it. I overrode the resize method, and now it seems to work fine.
"Paul Nicholls" <paul-nicholls (AT) hotmail (DOT) com> wrote
| Quote: | You could try overriding the compound component's SetBounds method and
place
it there...
"Clayton L. Wilson" <claytonwilson (AT) ev1 (DOT) net> wrote in message
news:3f30500a (AT) newsgroups (DOT) borland.com...
I have written a compound component, that when I resize it on the form,
I
need to resize the subcomponents. I placed my code under Refresh and
Repaint, but program execution never seems to go there. The code works
fine,
I just don't know where to place it in my component. Can someone out
there
tell me where to place it. Thanks a bunch.
--
Clayton L. Wilson
|
|
|
| Back to top |
|
 |
Alexander Bauer Guest
|
Posted: Wed Aug 06, 2003 11:01 am Post subject: Re: refresh doesn't work |
|
|
Hi,
Just for the future: If you recieve the errror "... has no parent window",
you try to do something that needs a valid windowhandle witch is not created
jet. Check if HandleAllocated before executing theese lines to permit that
error. Eg. the window of your parent (containier) control is not created jet
and your code calls a function, or what ever, that uses the property Handle
of it, or your child controls windowhandle is not created jet and you do
something that needs the Handle (could be also somewhere in the VCL not in
you code directly). If you first check if HandleAllocated then you woun't
get that error.
Regards,
Alexander Bauer
"Clayton L. Wilson" <claytonwilson (AT) ev1 (DOT) net> schrieb im Newsbeitrag
news:3f305c38 (AT) newsgroups (DOT) borland.com...
| Quote: | I tried that, but I keep getting the error:
Control '' has no parent window.
Am I doing something wrong for Refresh not to be called?
"Paul Nicholls" <paul-nicholls (AT) hotmail (DOT) com> wrote in message
news:3f305370$1 (AT) newsgroups (DOT) borland.com...
You could try overriding the compound component's SetBounds method and
place
it there...
"Clayton L. Wilson" <claytonwilson (AT) ev1 (DOT) net> wrote in message
news:3f30500a (AT) newsgroups (DOT) borland.com...
I have written a compound component, that when I resize it on the
form,
I
need to resize the subcomponents. I placed my code under Refresh and
Repaint, but program execution never seems to go there. The code works
fine,
I just don't know where to place it in my component. Can someone out
there
tell me where to place it. Thanks a bunch.
--
Clayton L. Wilson
|
|
|
| Back to top |
|
 |
Clayton L. Wilson Guest
|
Posted: Thu Aug 07, 2003 4:37 pm Post subject: Re: refresh doesn't work |
|
|
Thanks. I kind of thought that is what it was. In my code, I am performing
this before the handle. I overrode the CreateWindowsHandle proc though. Now
I can see just where the error happens.
"Alexander Bauer" <Alexander.Bauer (AT) AlBaWare (DOT) de> wrote
| Quote: | Hi,
Just for the future: If you recieve the errror "... has no parent window",
you try to do something that needs a valid windowhandle witch is not
created
jet. Check if HandleAllocated before executing theese lines to permit that
error. Eg. the window of your parent (containier) control is not created
jet
and your code calls a function, or what ever, that uses the property
Handle
of it, or your child controls windowhandle is not created jet and you do
something that needs the Handle (could be also somewhere in the VCL not in
you code directly). If you first check if HandleAllocated then you woun't
get that error.
Regards,
Alexander Bauer
"Clayton L. Wilson" <claytonwilson (AT) ev1 (DOT) net> schrieb im Newsbeitrag
news:3f305c38 (AT) newsgroups (DOT) borland.com...
I tried that, but I keep getting the error:
Control '' has no parent window.
Am I doing something wrong for Refresh not to be called?
"Paul Nicholls" <paul-nicholls (AT) hotmail (DOT) com> wrote in message
news:3f305370$1 (AT) newsgroups (DOT) borland.com...
You could try overriding the compound component's SetBounds method and
place
it there...
"Clayton L. Wilson" <claytonwilson (AT) ev1 (DOT) net> wrote in message
news:3f30500a (AT) newsgroups (DOT) borland.com...
I have written a compound component, that when I resize it on the
form,
I
need to resize the subcomponents. I placed my code under Refresh and
Repaint, but program execution never seems to go there. The code
works
fine,
I just don't know where to place it in my component. Can someone out
there
tell me where to place it. Thanks a bunch.
--
Clayton L. Wilson
|
|
|
| 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
|
|