[wxPython-users] Re: MenuBar and Mouse Motion Events

Robin Dunn robin at alldunn.com
Mon Dec 31 15:45:52 PST 2007


Stef Mientki wrote:
> 
> 
> Dominik wrote:
>> Marc Lebrun <marclebrun <at> skynet.be> writes:
>>     
>>> Could you also explain what goal you're trying to reach, maybe we 
>>> could find another way to do it, instead of catching mouse events...
>>>
>>>     
>>
>> I try to make a Window without title bar (but with menubar) that can be
>> moved around by dragging menu bar - that is why it is so important for 
>> me to catch mouse motion events. Thanks in advance for your help!
>>   
> If you don't have a captionbar on your form,
> it's common to use every free point of the form to drag the form around,
> so that's even the menubar excluded.
> Unfortunately I don't know how it's done in Python (have done it in Delphi)
> 

There is an example of this (dragging a window without a caption) in the 
ShapedWindow sample in the demo.  Look at the  handlers for 
EVT_LEFT_DOWN, EVT_LEFT_UP and EVT_MOTION.


-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!




More information about the wxpython-users mailing list