[wxPython] RE: Help needed with ToolTips (John Blacker)

I found the answer myself...guess I should have looked harder to begin with...
Anyway, for those interested, here's a code snippet which will produce a
ToolTip for
a button:

dn = wxButton(win, wxID_OK, " DONE ", wxPoint(75,190), wxDefaultSize)
if dn:
  dn.SetToolTip(wxToolTip("Click this button to submit your changes"))

Amazingly simple, after you see it done, but I didn't find the doc much
use...found the answer in
the wxPython demo code.

One note of interest: it also supports "multi-line tool tips" if you put
"\n"'s in the text! Neat, I had a
hell of a time doing that in Java!

···

***********************************************
John Blacker
Director, Qualtech, Inc.
480 Wintery Circle N.
Colorado Springs, CO 80919
Ph: 719-264-7855
Email: jcblacker@mindspring.com
Fax: 719-264-7855
Home: 719-598-6721
Cell/Voice mail: 719-648-3746
***********************************************

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

John Blacker writes:

dn = wxButton(win, wxID_OK, " DONE ", wxPoint(75,190), wxDefaultSize)
if dn:
  dn.SetToolTip(wxToolTip("Click this button to submit your changes"))

Amazingly simple, after you see it done

Even simpler:
dn.SetToolTipString("Click this button to submit your changes")

:slight_smile:

···

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users