1. You can use a wx.MemoryDC to draw whatever you want onto a wx.Bitmap, and then the bitmap can be converted to a wx.Icon.
2. You can change icons by just calling SetIcon again, and that should not be resource intensive at all. RemoveIcon only needs to be called when you do not want to have any icon in the taskbar anymore.
On Wednesday, September 4, 2019 at 5:08:06 PM UTC-7, Nathan smith wrote:
I'm writing a program that includes a clock.
I'd like to make it to where the task bar icon is either a tiny digital
clock with the time inside it, that updates, or just a little, readable
box with the time inside it.
To that end, first, is there a way in wx python to make an icon for the
task bar icon which is just, for example, a white background with black
text on it?
And secondly, if I want to update the task bar icon, would it be:
then self.taskbaricon.setIcon(newicon, newtooltip)
Is that very resource intensive? As it is being done every second for a
clock, I'm hoping not.