[wx-dev] wxTaskBarIcon::SetIcon enhancement

David Barnard david at didactylos.net
Sat Jul 12 02:05:27 PDT 2008


wxTaskBarIcon::SetIcon(const wxIcon &icon, const wxString &tooltip)
has a couple of small problems. tooltip defaults to an empty string,
which means it needs specifying explicitly every time (since a taskbar
icon without descriptive text is neither useful nor accessible).
Secondly, there is no way to change the tooltip without also
specifying the icon.

I propose adding two extra functions:
wxTaskBarIcon::SetIcon(const wxIcon &icon)
wxTaskBarIcon::SetTitle(const wxString &tooltip)

And leaving the existing overload, but removing the default parameter.
This won't break existing code, and the only change in behaviour will
be that SetIcon(icon) won't blank the tooltip. I think this behaviour
is what most developers would expect.

One final note: MSW uses the title for more than just the tooltip. It
identifies the icon when customising the notification area.

I can provide a patch.

David Barnard


More information about the wx-dev mailing list