Nick_Drian
(Nick Drian)
February 19, 2025, 10:33pm
1
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?
pierrec
(Pierre Cuvilliers)
February 19, 2025, 10:50pm
2
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
Nick_Drian
(Nick Drian)
February 19, 2025, 10:55pm
3
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
});
};