All:
The following program works as expected in the Python 2.5 environment (i.e., the ToolTip appears when you mouse over the button):
import wx
class MainWindow(wx.Frame):
def __init__(self):
wx.Frame.__init__(self,None,-1,"Test tool tips")
butt = wx.Button(self,-1,"Press me")
s = "Go ahead, make my day"
butt.SetToolTip(wx.ToolTip(s))
self.Show(True)
def runapp():
app = wx.PySimpleApp()
MainWindow()
app.MainLoop()
runapp()
I build this program into an executable using the following setup script:
import py2exe
from distutils.core import setup
win0 = {
"script" : "tt.py",
}
setup(version="0.0",
description = "Test program for tool tips",
windows = [win0],
# options = {"py2exe": {"bundle_files" : 1,"optimize" : 2,"compressed" : 1}}
)
I invoke the script with setup py2exe. The resulting program runs but there is no ToolTip above the button. Commenting back in the last line of the build script makes no difference. Changing the main script to butt.SetToolTipString("Go ahead, make my day") instead of having two lines makes no difference.
How can a py2exe build differ from a .py program? Does anybody understand what's going on?
My tools are wxPython 2.8.6.1, Python 2.5.1, py2exe 0.6.6, pywin32 2.10.
Paul Cornelius