Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _configure_mousewheel(self):
if self.usemousewheel:
BindManager.init_mousewheel_binding(self)
if self.hsb and not hasattr(self.hsb, 'on_mousewheel'):
self.hsb.on_mousewheel = BindManager.make_onmousewheel_cb(self, 'x', 2)
if self.vsb and not hasattr(self.vsb, 'on_mousewheel'):
self.vsb.on_mousewheel = BindManager.make_onmousewheel_cb(self, 'y', 2)
main_sb = self.vsb or self.hsb
if main_sb:
self.on_mousewheel = main_sb.on_mousewheel
bid = self.bind('',
lambda event: BindManager.mousewheel_bind(self),
add='+')
self._bindingids.append((self, bid))
bid = self.bind('',
lambda event: BindManager.mousewheel_unbind(),
add='+')
self._bindingids.append((self, bid))
for s in (self.vsb, self.hsb):
if s:
bid = s.bind('',
lambda event, scrollbar=s: BindManager.mousewheel_bind(scrollbar),
def _configure_mousewheel(self):
cwidget = self.cwidget
if self.usemousewheel:
BindManager.init_mousewheel_binding(self)
if self.hsb and not hasattr(self.hsb, 'on_mousewheel'):
self.hsb.on_mousewheel = BindManager.make_onmousewheel_cb(cwidget, 'x', 2)
if self.vsb and not hasattr(self.vsb, 'on_mousewheel'):
self.vsb.on_mousewheel = BindManager.make_onmousewheel_cb(cwidget, 'y', 2)
main_sb = self.vsb or self.hsb
if main_sb:
cwidget.on_mousewheel = main_sb.on_mousewheel
bid = cwidget.bind('',
lambda event: BindManager.mousewheel_bind(cwidget),
add='+')
self._bindingids.append((cwidget, bid))
bid = cwidget.bind('',
lambda event: BindManager.mousewheel_unbind(),
add='+')
self._bindingids.append((cwidget, bid))
for s in (self.vsb, self.hsb):
if s:
def _configure_mousewheel(self):
if self.usemousewheel:
BindManager.init_mousewheel_binding(self)
if self.hsb and not hasattr(self.hsb, 'on_mousewheel'):
self.hsb.on_mousewheel = BindManager.make_onmousewheel_cb(self, 'x', 2)
if self.vsb and not hasattr(self.vsb, 'on_mousewheel'):
self.vsb.on_mousewheel = BindManager.make_onmousewheel_cb(self, 'y', 2)
main_sb = self.vsb or self.hsb
if main_sb:
self.on_mousewheel = main_sb.on_mousewheel
bid = self.bind('',
lambda event: BindManager.mousewheel_bind(self),
add='+')
self._bindingids.append((self, bid))
bid = self.bind('',
lambda event: BindManager.mousewheel_unbind(),
add='+')
self._bindingids.append((self, bid))
for s in (self.vsb, self.hsb):
if s:
def _configure_mousewheel(self):
cwidget = self.cwidget
if self.usemousewheel:
BindManager.init_mousewheel_binding(self)
if self.hsb and not hasattr(self.hsb, 'on_mousewheel'):
self.hsb.on_mousewheel = BindManager.make_onmousewheel_cb(cwidget, 'x', 2)
if self.vsb and not hasattr(self.vsb, 'on_mousewheel'):
self.vsb.on_mousewheel = BindManager.make_onmousewheel_cb(cwidget, 'y', 2)
main_sb = self.vsb or self.hsb
if main_sb:
cwidget.on_mousewheel = main_sb.on_mousewheel
bid = cwidget.bind('',
lambda event: BindManager.mousewheel_bind(cwidget),
add='+')
self._bindingids.append((cwidget, bid))
bid = cwidget.bind('',
lambda event: BindManager.mousewheel_unbind(),
add='+')
self._bindingids.append((cwidget, bid))
for s in (self.vsb, self.hsb):
if s:
bid = s.bind('',
lambda event, scrollbar=s: BindManager.mousewheel_bind(scrollbar),