All Questions
10 questions
0
votes
2
answers
2k
views
on_click function assigned to Streamlit button runs before the click event in browser
I am trying to run a script in streamlit button with onclick="" parameter. Problem is, the script start running before even button shows up on the browser. Any idea what maybe the mistake ...
0
votes
1
answer
118
views
how to access a list declared inside a function from outside without calling the function in python?
iam trying to open a file from a location specified using tkinter askopenfile() method using 'open' button as follows:
def open_file():
file = askopenfile(mode ='r', filetypes =[('text files', '*....
2
votes
1
answer
31
views
How can i Bind a func to a button and a key
I'm trying to bind the Enter Key to the Enter Button, but if i try it with "event" the function dosn't work, if i do it without the key don't works.
Below are the pieces of the code for this problem.
...
0
votes
1
answer
189
views
Why is my kivy program not calling the function from another class?
I think this is more of a python question than a kivy question.
class Keyboard is sharing a method from class GUI. I created a GUI instance called self.a to connected the 2 classes in class Keyboard. ...
0
votes
0
answers
76
views
How to Call a Function with 'on_press' command inside same class using KIVY button
I'm trying to call a popup and the have the user input text. After hitting the save button inside my popup it updates a new widget.
I have almost everything working but I don't know how to properly ...
-1
votes
1
answer
82
views
Can you make a def method that makes more def methods for Python
I've been playing around with tkinter a little and I found that you have to make a def method to use buttons. So I wanted to make 13 buttons because I wanna make a calculator but I really didn't want ...
0
votes
0
answers
30
views
Issue with the same looped function running more than once when called by buttons in tkinter
I have a program where a ball is moved around a screen by 8-way movement buttons, using this function:
def contMove(moving):
global a
global b
global X, Y
if moving:
a = a + ...
1
vote
1
answer
2k
views
Tkinter link button press and 'return' key
I've looked at various tutorials for how to link a button press and a keyboard press of 'return.' I can do them both, but only one at a time. The keyboard style is rootWindow.bind('<Return>' ...
0
votes
1
answer
5k
views
Python function returns PY_VAR1 unexpectedly
I am expecting my button function to print a number (minutes_selected) based on the current value of the Spinner UI element, but the variable is always PY_VAR1:
from tkinter import *
from tkinter ...
0
votes
1
answer
482
views
python 3.2, tkinter. Use functions and graphics to return a variable when a button is pressed
I'm trying to make it so my main() function calls upon the getWordUser() function to make a button. Once the button is pressed, the Word_and_Username() function is called to return the username and ...