![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 6 of 6 total |
![]() |
Wed, Aug 19 2015 4:14 PM | Permanent Link |
squiffy Telemix Ltd. | I can't seem to attach an OnLoad handler to a TBrowser control programmatically. It's fine if I add it to the properties in the visual designer but it just doesn't seem to fire if I add it in code.
Reason is I want to create a TBrowser control to receive the response from a submitted form, but I don't see the need to have a visual control on the from itself. No big thing - I've just dropped on on there and made it invisible - but should I be able to do programmatically create one and attach the handler in code? |
Thu, Aug 20 2015 12:35 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | << No big thing - I've just dropped on on there and made it invisible - but should I be able to do programmatically create one and attach the handler in code? >>
Sure, there is absolutely no difference between the two at runtime. Are you sure that you're doing things correctly in your code ? If you send me a sample, I can check it out. Tim Young Elevate Software www.elevatesoft.com |
Wed, Sep 2 2015 3:38 AM | Permanent Link |
squiffy Telemix Ltd. | Sorry for the delay in responding - attached is a working (broken?) example.
Clicking the form button fires the onUnload event, but the onLoad never fires. This seems to work when I drag a browser onto the form. Attachments: browser-onload-test.zip |
Wed, Sep 2 2015 4:03 AM | Permanent Link |
squiffy Telemix Ltd. | Sorry - ignore that example. I zipped the wrong project.
See attached. I have added a visual browser control (Browser2) to the form. If you swap out Browser1 for Browser2 in the code it works, but Browser1 nothing fires. What have I done wrong? Attachments: browser-load-test-2.zip |
Thu, Sep 3 2015 3:21 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | << See attached. >>
Okay, three things: 1) There's a bug in your code, but the compiler isn't catching it: procedure TForm1.Form1Create(Sender: TObject); begin Browser1:=TBrowser.Create(TForm1); <<<<<< TForm1 is a class, not a class instance end; 2) You need to assign a name to the Browser1 control. The name is used to hook up the HTML form to the control for output. procedure TForm1.Form1Create(Sender: TObject); begin Browser1:=TBrowser.Create(Form1); Browser1.Name:='TestBrowser'; end; 3) Even after all that, there's still a bug in the underlying frame element in the EWB UI layer that will prevent proper operation, and that's been fixed for B3. Thanks, Tim Young Elevate Software www.elevatesoft.com |
Mon, Sep 7 2015 1:43 PM | Permanent Link |
squiffy Telemix Ltd. | Thanks, Tim.
|
This web page was last updated on Tuesday, February 11, 2025 at 11:58 AM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |