Firing events from buttons in a ButtonPanel

This seems weird but.. I was using a ToolBar before changing to ButtonPanel, so
this is what I noticed: It seems ButtonPanel "misses" some events, this is,
sometimes I click on a Button that is inside a ButtonPanel but It just doesnt
fire an event. With ToolBar this was different, everytime I clicked it worked.

I don't what else to say, it is weird..

I did some tests now, and what I can say is:

If you are moving your mouse, and click a button in ButtonPanel, the event
doesnt fire.

Well, I know it is annoying to reply each minute but this is what I did now:

Placed some prints on ButtonPanel, and I believe I found the problem. When I'm
moving the mouse hover a button, it SetStatus() to "Hover". And, to fire the
event, inside OnLeftUp it check for Status of "Pressed" that is set by LeftDown.
And, LeftDown set it as "Pressed" but Mouse movement override that with "Hover"
and the event doesn't fire.

Again me :wink:

Well, just to fix what I've experiencing I changed the following...

Inside Class ButtonPanel:

    def OnLeftUp(self, event):
        ...
        #if hit.GetStatus() == "Pressed" # changed to:
        if hit.GetStatus() == "Pressed" or hit.GetStatus() == "Hover":
          ...

Probably this isn't the right way to fix it, but I'm using this "my own bad fix"
till it gets really fixed.

You are right Robin =)

Thanks