Will Sadkin was wondering why the wxListCtrl doesn't automatically show a tool tip on wxMSW when the items are partially obscured. The wxTreeCtrl does it and the list control in other apps does it too...
So Will and friends did a bit of research and figured out how to do it. "...it requires a recent version of the comctl32.dll (version 5.80+), such as distributed with IE5, but it works."
Here's a snippet showing how to do it:
# Turn on labeltips in list control from win32api import SendMessage import commctrl # from win32 extensions for constants # All of the extended label styles are missing from the # current version (1.1) of commctrl.py, but this is the value # needed: LVS_EX_LABELTIP = 16384 style = SendMessage(listCtrl.GetHandle(), commctrl.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0) style = style | LVS_EX_LABELTIP SendMessage(listCtrl.GetHandle(), commctrl.LVM_SETEXTENDEDLISTVIEWSTYLE, 0, style)
There is also a LVS_EX_INFOTIP style that can be used with 4.71+ of comctl32.dll, but requires responding to a notification message to set the text to be used for the tool tip. If somebody wants to make a patch to the C++ code for wxListCtrl that implements this I'm sure it will be accepted.