Every line of 'python button press' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
7 def press(btn): 8 if btn == "Page A": showPageA() 9 elif btn == "Page B": showPageB() 10 elif btn == "Page C": showPageC()
97 def onPress(self): 98 if self.c.onEnter is not None: 99 self.c.onEnter()
170 def on_pressed(callback, args=()): 171 """ Invokes `callback` with `args` when the left button is pressed. """ 172 return on_button(callback, args, [LEFT], [DOWN])
22 def on_press(self, key, x, y): 23 if key != pyxel.KEY_LEFT_BUTTON: 24 return 25 26 if x % self._interval < BUTTON_SIZE and y % self._interval < BUTTON_SIZE: 27 value = (y // self._interval) * self._col + x // self._interval 28 29 if self.value != value: 30 self.value = value 31 self.call_event_handler("change", value)
30 def on_button_press(self,widget,data=None): 31 print "on_button_press"
10 def press(name): 11 word = win.getEntry("Word") 12 if word in trans: 13 ans = trans[word] 14 else: 15 ans = "Unknown..." 16 17 win.setLabel("l1", ans)
652 def press(self, event): 653 x, y = self.whichxy(event) 654 if x > 0 and y > 0: 655 self.setcurrent(x, y)
116 def _on_press(self, event): 117 if self.enabled: 118 self._value = 1
81 def pressTest(self, key): 82 print( "-> Pressing " + key.upper() )
1230 def _pressed(self): 1231 if self._pressed_icon is not None: 1232 self._widget.setIcon(self._pressed_icon)