1. Christopher Altvater
  2. PowerBuilder
  3. Friday, 1 May 2020 18:08 PM UTC

Hello,

In the new web browser control, is there a way to set the source like there is in the MS browser? I have an OLE control that uses the MS browser for viewing HTML code and PDF files. I want to replace this with the new web control, but I don't see a way to set the source HTML. Is there a way to do this?

Thanks,
Chris Altvater

Accepted Answer
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 1 May 2020 18:29 PM UTC
  2. PowerBuilder
  3. # Permalink

You can only navigate to a file, you can't set a string.

Comment
  1. Christopher Altvater
  2. Friday, 1 May 2020 19:10 PM UTC
I need to be able to set the source from a string. The HTML is coming from a database table and not a web server. I would rather not save it to a file only to have to open it. I can keep OLE control for the time being and see what enhancements are in the R3 release.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 1 May 2020 19:35 PM UTC
Yes, you would then need to write that BLOB data stream into a local HTML file and then point the Web Control to that .HTML file. It would be nice though to just paste the HTML right into the Control. I believe that Engineering is looking into that possibility for the R3 release.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 1 May 2020 18:42 PM UTC
  2. PowerBuilder
  3. # 1

Hi Chris;

  You can do this in the Window / User Object Painter ...

 OR, you can do this more dynamically via the "navigate" command.

Regards ... Chris

Comment
  1. Roland Smith
  2. Friday, 1 May 2020 19:03 PM UTC
You can navigate to a local file or URL. The MS WebBrowser control has the ability to set HTML from a string which is what it appears he wants to do.
  1. Helpful
  1. Christopher Altvater
  2. Friday, 1 May 2020 19:17 PM UTC
I am able to save my HTML string to a local file and the file opens in the browser control with no problems. I could live with this and I just need a process to clean up the files.

Thank you.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.