bind

bind Win_L with 'd' in tkinter

bind Win_L with 'd' in tkinter Question: from tkinter import * def quit_1(event): print("you pressed Win_L") root.quit() def quit_2(event): print("you pressed Win_L+D") root.quit() root = Tk() root.bind(‘<Win_L>’, quit_1) #working root.bind(‘<Win_L-D>’, quit_2) #not working root.mainloop() How I bind Win_L + D event to a funcction commenting line root.bind(‘Win_L-D’,quit_2) runs the program Asked By: Lakshit Karsoliya || …

Total answers: 1

Docker: Bind mount not reflecting unless container is restarted

Docker: Bind mount not reflecting unless container is restarted Question: TLDR: Flask application. When I make changes to the app.py file inside source folder of the bind, the change is reflected in the target folder. But when I hit the API from Postman, the change is not seen unless the container is restarted. Long Version: …

Total answers: 1

failed to resolve some method of tkinter

failed to resolve some method of tkinter Question: I am creating 2048 game on python with tkinter but I have a issue I don’t know what is wrong in left, right, up and down methods created in PageOne class. In another class (StartPage), bind function calls these methods but this don’t work So I don’t …

Total answers: 1

Responsive Status Bar & bind <Configure> problem

Responsive Status Bar & bind <Configure> problem Question: I am new to Tkinter and I am experimenting, trying to build a little library of helper classes. I am presently trying to create a status bar class, based upon a Label widget. I want to be able to make the width of the label adjust. I …

Total answers: 1

Why is Button not working in tkinter, when i click it it shows an error

Why is Button not working in tkinter, when i click it it shows an error Question: I am trying this code. I want to use don function for bind() and command. It is showing don() missing 1 required positional argument: ‘Event’. how to fix it my code from tkinter import * root = Tk() root.geometry("600×500") …

Total answers: 2

How can I unbind every single binding from a Tkinter root window

How can I unbind every single binding from a Tkinter root window Question: So I have an app in Tkinter that has a lot of buttons in the first screen and when you press one you pass into a new “Window” (basically destroying all widgets and drawing the ones that are needed for the ‘window’). …

Total answers: 2

Python alternative to Javascript function.bind()?

Python alternative to Javascript function.bind()? Question: In Javascript, one might write var ids = [‘item0’, ‘item1’, ‘item2’, ‘item3’]; // variable length function click_callback(number, event) { console.log(‘this is: ‘, number); } for (var k = 0; k < ids.length; k += 1) { document.getElementById(ids[k]).onclick = click_callback.bind(null, k); } So I can pass to the callback function …

Total answers: 1

Python: Bind an Unbound Method?

How to bind an unbound method without calling it? Question: In Python, is there a way to bind an unbound method without calling it? I am writing a wxPython program, and for a certain class I decided it would be nice to group the data of all of my buttons together as a class-level list …

Total answers: 6