wxMAC - moving frames by toolbar or statusbar Topic is solved
wxMAC - moving frames by toolbar or statusbar
Hi guys,
It is possible to move frames (windows) by clicking / dragging the toolbar & statusbar (but not only frame titlebar). It is a default behavior on OS X.
Is any default way exits to do that in wxWidgets?
wxWidgets 2.8.9.2 / Mac OS X 10.5.6
It is possible to move frames (windows) by clicking / dragging the toolbar & statusbar (but not only frame titlebar). It is a default behavior on OS X.
Is any default way exits to do that in wxWidgets?
wxWidgets 2.8.9.2 / Mac OS X 10.5.6
Managing mouse events
Thanks for the tip about mouse events. Today I tried to do that, but I don't receive any events once the toolbar is attached to a frame (wx.Frame.SetToolBar). So, I don't have any ideas how to catch them.
Forgot to say, I'm using wxPython 2.8.9.2.
Forgot to say, I'm using wxPython 2.8.9.2.
Re: Managing mouse events
I frequently use wxPython 2.xvictor-ki wrote:Thanks for the tip about mouse events. Today I tried to do that, but I don't receive any events once the toolbar is attached to a frame (wx.Frame.SetToolBar). So, I don't have any ideas how to catch them.
Forgot to say, I'm using wxPython 2.8.9.2.
Post your current code for the event bind logic, I may still be able to help.
This is a small script which I created to play with a toolbar.
Code: Select all
import wx
class MainToolBar(wx.ToolBar):
def __init__(self, Parent):
wx.ToolBar.__init__(self, Parent)
self.Bind(wx.EVT_MOUSE_EVENTS, self.OnMouse)
self.AddSeparator()
self.Realize()
def OnMouse(self, Event):
print "event"
Event.Skip()
class MainFrame(wx.Frame):
def __init__(self, Parent):
wx.Frame.__init__(self, Parent)
ToolBar = MainToolBar(self)
self.SetToolBar(ToolBar)
app = wx.App(redirect=False)
frame = MainFrame(None)
frame.Show()
app.MainLoop()