Clicking LinkButton does nothing?

Im creating a link button as follows:

         LinkButton linkToDocsButton = new LinkButton {
             Text = "www.somewebsite.com",
             Tag = "Link To Docs",
         };

There are two Issues that I cant figure out.

Firstly, clicking the button does not open a browser tab and direct me to the link.

Secondly, I would like the text to be “Link to Docs” but instead it is “www.somewebsite.com

Does anyone know how to get this working?

If you are using LinkButton in Eto, Text is the field that sets the text shown in the button, not the URL to open. Have a look in the docs for how to open a URL in a browser: Rhino - Eto Controls in Python

2 Likes

Thanks. I got it working.

My code now looks like this:

LinkButton linkToDocsButton = new LinkButton {
    Text = "Link To Docs",
};
linkToDocsButton.Click += (sender, e) => {
    Process.Start(new ProcessStartInfo
    {
        FileName = linkToDocs,
        UseShellExecute = true
    });
};