6

I got a tkMEssagebox.showerror showing up in a python tkinter application, when somebody failed to login with the application. Is it possible to have a url link in the tkMessageBox.showerror?

ie.

tkMessageBox.showerror("Error","An error occured please visit www.blahblubbbb.com")

and I want the www.blahblubbbb.com to be clickable?!

dave
  • 161
  • 2
  • 12
  • 4
    Hey, your question got me curious, so I wrote up a quick prototype of a hyperlink messagebox. I've put it on pastebin: http://pastebin.com/u0Z3CdtX. Not very complete, but it should give you an idea of what to do should you decide to roll your own. – Joel Cornett Nov 22 '12 at 09:25
  • awesome Joel ... thanks for the work! I've saved a copy of it on my gist if its ok with you cause I always lose pastebin links :-) https://gist.github.com/4130284 – dave Nov 22 '12 at 09:48
  • as of this http://www.tcl.tk/man/tcl8.4/TkCmd/cursors.htm the cursor on Enter has to be either hand1 or hand2 :-) – dave Nov 22 '12 at 09:55
  • 1
    @JoelCornett: Very nice! Why don't post it as an answer? Wouldn't mind your answer getting picked! ;-) – Don Question Nov 22 '12 at 21:08
  • @JoelCornett Thats so nice. I will suggest you the set the border `bd` of the text to 0 so there is no difference. – Nouman Aug 19 '18 at 11:32

1 Answers1

3

Short answer: "No!" message is a simple string, no interpretation like in some widgets of other frameworks is done.

Longer answer: You could e.g. subclass+monkeypatch, to provide such feature.

Don Question
  • 11,227
  • 5
  • 36
  • 54