Webbrowser lazarus / 8-Other ---------------------------------------------------------------------- schu-r · 2006-08-08 11:33 HI ! Looking for a way to display a Webpage. Would be fine if i can show it to the User in the Programm instead of opening the System default browser. Is there a way to include IE or Geco in a Browserwindow. I need a full featured Browser because of massive use of CSS. On the other hand Can I open a Instance of the Systems default browser and let him refresh the Page by Programm. So everytime the User wants to look at the page I pop up the Instance and Refresh? ThanX ---------------------------------------------------------------------- felipemdc · 2006-08-31 01:47 Turbo Power has a component that shows webpages. I read it works on Lazarus: http://www.bsdg.org/resources/turbopower.html > On the other hand Can I open a Instance of the Systems default browser and let him refresh the Page by Programm. So everytime the User wants to look at the page I pop up the Instance and Refresh? Yes, that will do it, but the code for that is platform dependent. On Windows you use ShellExecute API function. On Linux you use the shell command from Unix unit to execute firefox. The name of the browser changes from distro to distro, so you need to search which browsers are available. I already did that on the magnifier, if you want I can post the code here. ---------------------------------------------------------------------- Hansaplast · 2008-06-25 03:32 Just something I bumped into using Mac OSX when trying to open a default browser with a provided link. In the shell this works out of the box (uses the default browser): Code: [Select]open http://www.weethet.nl I tried Ubuntu, but as Sekel kid-a already pointed out: distro's do not seem to handle this all in the same way. Easier said: it didn't work using Ubuntu Is there nothing under Linux that provides similar functionality?[/i] ---------------------------------------------------------------------- tech-pro · 2008-06-25 07:47 In my Linux app I just provided a configuration option where the user can type in the name or path of the browser you want to use. Then I run it using the command to run an external program. I run Firefox, and I found that "firefox " works. Just run it the same way you would any other external program. ---------------------------------------------------------------------- Leledumbo · 2008-06-25 08:11 If I'm not mistaken, there's an example under Lazarus directory that demonstrate viewing of webpages. ---------------------------------------------------------------------- Hansaplast · 2008-06-25 13:13 Quote from: "tech-pro"In my Linux app I just provided a configuration option... One of the purpose for me is to have a clickable label to my website. Having the user configure their application to just do that seems to defeat the purpose For now I suppose a ShellExec in Windows and a "Open ..." in Mac OSX should work. For Linux users the label will simply not respond to clicks (I'm a little disappointed in Linux right now) ---------------------------------------------------------------------- Phil · 2008-06-26 13:56 Quote from: "Hansaplast"Quote from: "tech-pro"In my Linux app I just provided a configuration option... One of the purpose for me is to have a clickable label to my website. Having the user configure their application to just do that seems to defeat the purpose For now I suppose a ShellExec in Windows and a "Open ..." in Mac OSX should work. For Linux users the label will simply not respond to clicks (I'm a little disappointed in Linux right now) Have you tried the TOvcURL control? http://wiki.lazarus.freepascal.org/OrphPort This provides an underlined, clickable link just like in a Web page. I believe it works fine on Linux too. Thanks. -Phil ---------------------------------------------------------------------- Hansaplast · 2008-06-26 17:09 Thanks Phil - I'll give that a try. Looks like some interesting components. Thanks again! ---------------------------------------------------------------------- Phil · 2008-06-26 17:44 Quote from: "Hansaplast"Thanks Phil - I'll give that a try. Looks like some interesting components. Thanks again! To solve the problem of no standard way of associating a file type with a program on Linux, it just launches the first brower it finds to open the URL. That should work for you. And since TOvcURL is just a TCustomLabel descendent it shouldn't add much code your app. I've been working on the table controls again lately and have made a lot of improvements now that the Carbon widgetset is maturing. I'll be posting an update before too long. Thanks. -Phil