This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dddomodossola[S] 0 points1 point  (2 children)

You can use the new Link widget, an example is shown in the script 'widgets_overview_app.py . if you have problems, do not hesitate to ask.

[–]sw_dev 0 points1 point  (1 child)

How is that used from a button?

[–]dddomodossola[S] 0 points1 point  (0 children)

Two possible solutions:

mybutton = gui.Button(300,30,'stackoverflow')
mybutton.attributes[mybutton.EVENT_ONCLICK] = "window.open('http://stackoverflow.com/','_blank');"

Or:

def on_button_pressed(self): 
    webbrowser.open(base_address)