On 7/18/07, d. sarthi maheshwari <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> I am working on R 2.5.0 on window. I am trying to provide a Hyper-link to
> the user as a result, I have tried using gtkLinkButton to exercise the
> facility, however, i am not able to perform the required task, i.e. when I
> clicked on the LinkButton actually nothing happened.
>
> I have gone through the documentation for the same and found that
> GtkLinkButtonUriFunc is a function which is require to do something with
> the
> opening of the given URL. Further, I didn't find any other information
> regarding this.
You can find documentation on this by typing help(GtkLinkButtonUriFunc). You
might have to scroll down a little since the so-called "user functions" are
described in the overview file for a type.
This is the signature for that function:
GtkLinkButtonUriFunc(button, link, user.data)
So you can define such a function like:
uri_hook <- function(button, link, data) browseURL(link)
and set it with gtkLinkButtonSetUriHook(uri_hook, NULL).
A case could be made that this should be set as the default by RGtk2.
Michael
Following is my code:
>
> messlab <- gtkLabelNew(str = "Please wait!", show = TRUE)
> messwin <- gtkWindowNew(type = NULL, show = TRUE)
> messwin$Add(messlab)
> gtkWindowResize(messwin, 250, 60)
> gtkWindowSetTitle(messwin, "Graph Analysis")
>
> ....
> ....
> ....
>
> fihor <- gtkHPanedNew(show = TRUE)
> fn <- gtkLinkButtonNewWithLabel("http://cran.r-project.org/", "Result
> Link!")
> messwin$Remove(messlab)
> gtkLabelSetText(messlab, "Result link is ::")
> gtkPanedAdd1(fihor, messlab)
> gtkPanedAdd2(fihor, fn)
> gtkPanedSetPosition(fihor, 100)
> gtkWindowSetTitle(messwin, "Result Link")
> gtkWindowResize(messwin, 380, 60)
> messwin$Add(fihor)
>
> I am confused how to make this link workable on click?
>
> Your replies/suggestions are important to me. Please suggest solution.
>
> Thanks in advance.
> Divya Sarthi
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.