[Gambas-user] Hyperlinks
Benoit Minisini
gambas at ...1...
Thu Sep 27 16:52:25 CEST 2007
On jeudi 27 septembre 2007, David Paleino wrote:
> Hi all,
> I'm working on a bts2ldap GUI to use on Debian systems. I've abandoned the
> use of gb.ldap, since it simply doesn't work (oh, well, it might, but it's
> not that documented), and I'm using ldapsearch from a shell.
Apparently it does not work. I have no news from its developer, so this
component may be removed in 2.0.
> Now, let's go down to business.
>
> I have a GridView component with all the bugs listed, and when one
> double-clicks on an item, a new Form opens up, showing details for that
> Bug. Now, I wanted to add a row pointing to the Debian BTS page, i.e.
> adding an hyperlink. What I've done so far is:
>
> colDetails.Add("url", "URL")
> colDetails.Item[1] = "http://bugs.debian.org/" & bug
>
> (that is, just adding a new row), but I can't find anywhere how one could
> add a Hyperlink. I don't know if Gambas has this "feature", I just wanted
> to avoid calling an external program myself (that means, I should try to
> detect the default web-browser, and passing parameters to it).
You can use the gb.desktop component. It adds a Desktop.Open() method that can
open an URL inside the browser or prefered application of the desktop in use.
It is based on the Portland project (See the documentation on the wiki).
Your two lines of code are for a ColumnView, not a GridView. Anyway, you
should use a GridView, and opens the URL when the user clicks on the cell
that displays the link.
Regards,
--
Benoit Minisini
More information about the User
mailing list