views:

46

answers:

1

Hello,

I have a wx.toolbar with some buttons. One of the buttons makes pan left! I want to click on the button and while I keep it pressed, the pan left is made.

For now I only saw that the wx.EVT_TOOL only works when mouse left is up.

Is there a way to do what I intend ?

+1  A: 

In the toolbar button's event, you should be able to get the state of the mouse via wx.GetMouseState.

Alternatively, you can make your own toolbar with a panel and some wx.Buttons (or other button widgets).

Mike Driscoll
the problem is that the wx.EVT_TOOL works on mouseleftup (not after I click, only when I "unclick")..
aF
So don't use the ToolBar widget. Instead, create your own "toolbar" with a panel and some wx.Buttons.
Mike Driscoll
that should be your answer :P
aF
Fixed the answer
Mike Driscoll