PopupControl is a composite containing two other widgets, so calling SetToolTipString will only set it for the parent, not the children. You can work around this issue by also setting the tooltip for the child components, like this:
Thanks, should have thought about that one myself. I guess I got "distracted" by the fact that the context help worked when just doing "self.SetHelpText".
Werner
···
On 10/28/2011 08:06 PM, Robin Dunn wrote:
On 10/28/11 3:53 AM, werner wrote:
I have a custom control which is based on the code of the wxPython demo
PopupControl but the ToolTip is not shown when floating over it.
If I use the WIT and do: "obj.GetToolTipString()" I see the tool tip.
The context help on the same control does work fine.
Is there something special one has to do to make ToolTip to work on
controls based on PyControl?
One can see the problem by adding "self.SetToolTipString('something')"
to __init__ in the demo of PopupControl.
PopupControl is a composite containing two other widgets, so calling SetToolTipString will only set it for the parent, not the children. You can work around this issue by also setting the tooltip for the child components, like this: