tkinter Questions
0
I wrote a program to create a note pad. It has buttons toset text alignment.
def setAlignments(side):
try:
t1.tag_configure(side, justify=side)
# Clipboard clearing and new selection append to t...
Knp asked 13/8, 2023 at 11:40
2
I have been trying to create this piece that changes all of the white pixels in an image to the hex value of the current background but I cannot get past the error:
AttributeError: type object 'Ima...
Coben asked 7/8, 2023 at 11:52
1
I am trying to integrate a python code I found here on SO by a user @srccircumflex, his code is for tkinter and I tried to modify it because I'm using customtkinter
His code was using class PassEnt...
Ciborium asked 6/8, 2023 at 6:47
4
Solved
I have to perform an operation on several directories.
TKinter offers a dialog for opening one file (askopenfilename), and several files (askopenfilenames), but is lacking a dialog for several dir...
11
Solved
I'm using Tkinter as GUI for my program, but as I see, many programs don't have standard look as Tkinter does. By standard look I mean standard title bar, borders, etc.
For example, Tkinter's titl...
3
I am currently trying to code a basic smartmirror for my coding II class in high school with python. One thing I'm trying to do is open new tabs in full screen (using chrome). I currently have it s...
Misnomer asked 28/2, 2017 at 19:31
11
Solved
I have created a login window in tkinter which has two Entry field, first one is Username and second one is Password.
code
from tkinter import *
ui = Tk()
e1 = Entry(ui)
#i need a placeholder &q...
Guenon asked 7/1, 2015 at 13:4
5
I have two Python installations on my Debian Sid notebook, ⑴ the system's Python (v.2.7) with a little bunch of utility packages (including Tkinter) and ⑵ Anaconda's Python 3.
It is easy to see wh...
Lankton asked 12/12, 2017 at 9:29
4
I'm building a tkinter gui project and i'm looking for ways to run a tray icon with the tkinter window. I found Pystray library that does it, But now i'm trying to figure it out how to use this lib...
3
I am trying to create a button and change the height and width using the code below but the actual button doesn't show physically. However if you hover over the area it is supposed to be and click ...
4
The following code hangs without doing anything in Python 3.2.2 in Linux:
import tkinter
from multiprocessing import Process
def f():
root = tkinter.Tk()
label = tkinter.Label(root)
label.pack(...
Crave asked 25/5, 2012 at 13:54
3
Solved
I am trying to build a simple game of Connect Four with Python(2.7)
I have created a board, that consists of a simple multidimensional Python list.
My Board list looks like this:
board = [
[_,_,_,...
Teel asked 16/1, 2013 at 0:30
3
Entry widgets seem only to deal with single line text. I need a multiline entry field to type in email messages.
Anyone has any idea how to do that?
3
from Tkinter import *
import webbrowser
root = Tk()
frame = Frame(root)
frame.pack()
url = 'http://www.sampleurl.com'
def OpenUrl(url):
webbrowser.open_new(url)
button = Button(frame, text=&qu...
2
I am using Tkinter Label widget to display some text to my UI Frame and I want the Label to change the text every-time I click the button. In my case I got wrong... it didn't change, is it possible...
1
I want to call an async function from a Tkinter button command, or rather want to let the function run asynchronously, so that the tkinter window is responsive. I've tried command = open_async in t...
Antetype asked 31/8, 2021 at 4:38
3
Solved
My environment:
macOS 10.13
python 3.7.1 from Homebrew
I'm having lots of Tcl/TK quirks on the stock Tcl/TK 8.5 under /System/Library/Frameworks/Tcl.framework/Versions/8.5/, and would like to upgra...
6
I put button on a frame like this in Tkinter for python3:
b2_1 = Button(frame1, text='aaaaaaaaaaaa')
b2_1.pack(pady=20, side=RIGHT)
b2_2 = Button(frame1, text='bbbbbbbbbbbbbbb')
b2_2.pack()
I w...
Sialkot asked 25/12, 2016 at 17:37
9
Solved
The following is the overall structure of my typical Python Tkinter program.
def funA():
def funA1():
def funA12():
# stuff
def funA2():
# stuff
def funB():
def funB1():
# stuff
de...
3
Solved
Out of the box it seems that the demo app examples for PySimpleGui display with an "ugly" font when using Linux (Ubuntu 20.10).
As I cannot find any references how to control this in the ...
Dimer asked 18/4, 2021 at 12:51
4
Solved
By default, after making a tkinter button, it automatically puts the next one on the other line.
How do I stop this from happening?
I want to do something like this:
Pyrrolidine asked 1/8, 2018 at 10:31
3
Solved
It'd be awesome if I could get something like the below.
Pseudo Code:
U = widget1.SettingsGet()
Print U
Upon printing U something like this would be returned:
widget1(background='green',foreg...
1
I have a toolbar. It allows you to take screenshots with one button:
def screenshot():
try:
os.mkdir(r"C:\Screenshots")
except FileExistsError:
pass
global img
img = ImageGrab.gra...
Negligent asked 29/3, 2017 at 17:39
5
I am writing a simple python program with a UI, and i can't find out how to put a web page inside the program. I tried searching on Google, but i can't find any simple implementations.
Any links wo...
2
Solved
Python version 2.7
Code:
from Tkinter import *
root = Tk();
root.geometry ('{}x{}'.format(w,h));
left_frame = Frame(root, width = w*0.8, height=400, bg='#988C89');
right_frame = Frame(root, bg='#9...
© 2022 - 2024 — McMap. All rights reserved.