Friday, 15 February 2013

python - Using wxPython's FloatCanvas widget, is there a way to get the ControlDown information of the event? -


I can get keyboard modifier status on EVT_FC_LEFT_UP events removed from FloatCanvas.

I prefer to do this without having to type auto callback for keyback and keydown

Can not see a better way to grab control status, class members on full window Moderator monitors states. EVT_FC_LEFT_UP Callback?

There is no isKeyDown type method in wxPython (afaik)

The only way I see this is you

  control_pressed = False ..... self.float_canvas.bind (wx.EVT_KEY_DOWN, OnKeyDown) Float_canvas.bind (wx.EVT_KEY_DOWN, ONKOEP) ..... DF OnkDown (EVT): global control_prepared if evt.GetKeyCode () == 117 # (or whatever ctrl code is) control_pressed = True def OnKeyUp (evt) ): Global control - pressed if evt.GetKeyCode () == 117 # (or whatever the code is for ctrl) control_pressed = false   

and then control_pressed In my real life (TM) I suspect that you want all this N is not a class globe event handler event handler

>

No comments:

Post a Comment