Hello,
(This is my last question for the week, sorry for all these mails).
I would like to change the image of a ScaledBitmap when clicking on it :
A = self.Canvas.AddScaledBitmap(img, (0,0), Height=img.GetHeight(),
Position = 'tl')
A.Bind(FloatCanvas.EVT_FC_LEFT_DOWN, self.OnDown)
def OnDown(self, elt):
# ...
# Change A's image to another bitmap
*The goal is to make a ToggleButton : each click on the button would toggle
between img1 and img2.*
Remark : I already implemented it by doing :
A_enabled = self.Canvas.AddScaledBitmap(img_ena, (0,0),
Height=img_ena.GetHeight(), Position = 'tl')
A_disabled = self.Canvas.AddScaledBitmap(img_dis, (0,0),
Height=img_dis.GetHeight(), Position = 'tl')
and then each click on both of them would *hide one of them, and show the
other*...
But this is a kind of dirty way to do it...
It would be easier to change A's image when clicking on it : how is this
possible ?
Best regards, Jo
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas