![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Wed, Dec 3 2014 4:11 PM | Permanent Link |
Jim Gallagher | If I take the embedded form demo and add this to the resize event of the child form:
procedure TEmbeddedForm.EmbeddedFormResize(Sender: TObject); begin DockButton.Left := EmbeddedForm.Width div 2; end; (or any reference to the form's width or height) When I select a docking option that resizes the form I get an Application Error: "Unable to get property 'tcontrol_fwidth' of undefined or null reference Line: 20640" Is this as designed, or am I doing something wrong? It seems to happen only with embedded forms. -Jim |
Wed, Dec 3 2014 5:40 PM | Permanent Link |
Raul Globestar Systems ![]() | On 12/3/2014 4:11 PM, Jim Gallagher wrote:
> When I select a docking option that resizes the form I get an Application Error: "Unable to get property 'tcontrol_fwidth' of undefined or null reference Line: 20640" > > Is this as designed, or am I doing something wrong? It seems to happen only with embedded forms. You're doing it wrong - EmbeddedForm is not initialized (it's nil) so calling EmbeddedForm.Width results in the error. if you look at how the forms are created then you'll see that each embeddedform is created using local "TempForm" variable (makes sense since we want to be able to create more than one) hence the locally declared "EmbeddedForm" is never initialized. What you want to do in this case is refer to the actual instance of the form you're on so use this : DockButton.Left := self.Width div 2; Raul |
Wed, Dec 3 2014 10:05 PM | Permanent Link |
Jim Gallagher | Raul wrote:
>What you want to do in this case is refer to the actual instance of the >form you're on so use this : > DockButton.Left := self.Width div 2; You're right, of course. I should have seen that. Thanks for your help! -Jim |
This web page was last updated on Monday, September 25, 2023 at 03:00 PM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |