access function and variable of parent class in tkinter of python
Please see the code below I got from OysterShucker
Is it possible to take the ability to highlight text in a text widget
So I have a text widget that stores buttons within it, and I’m noticing the fact that the user can still highlight items, including the buttons, within the text widget. If you want the code for it, here’s a simple example.
Problem with the entry widget using Tkinter Python
from tkinter import * root = Tk() root.geometry(“1600×800+0+0”) root.title(“my notepad”) Tops = Frame(root, width=1650, height=50, bg=”light green”, relief=SUNKEN) Tops.pack(side=TOP) note = StringVar() Bottom = Frame(root, width=1600, height=655, bg=”light blue”, relief=SUNKEN) Bottom.pack(side=BOTTOM, fill=BOTH, expand=True) # Adjusted pack parameters txtstotal = Entry(Bottom, font=(‘arial’, 20, ‘bold’), textvariable=note, bd=10, insertwidth=4, bg=”light blue”, justify=”left”) txtstotal.pack(fill=BOTH, expand = True) root.mainloop() Here […]
problem with the entry widget in tkinter python
from tkinter import * root = Tk() root.geometry(“1600×800+0+0”) root.title(“my notepad”) Tops = Frame(root, width=1650, height=50, bg=”light green”, relief=SUNKEN) Tops.pack(side=TOP) note = StringVar() Bottom = Frame(root, width=1600, height=655, bg=”light blue”, relief=SUNKEN) Bottom.pack(side=BOTTOM, fill=BOTH, expand=True) # Adjusted pack parameters txtstotal = Entry(Bottom, font=(‘arial’, 20, ‘bold’), textvariable=note, bd=10, insertwidth=4, bg=”light blue”, justify=”left”) txtstotal.pack(fill=BOTH, expand = True) root.mainloop() here […]
Tkinter rows collapsing tic-tac-toe
Have worked with a friend through the tutorial for creating a tic-tac-toe game in Tkinter. We extended it to work for a 4×4 grid and wanted instead of using X’s and O’s to import our own custom images. We’ve managed to reconfigure the code that allows these images to be inserted when a grid square is clicked but we can’t work out why whenever a row or column is filled, it will collapse it down (whereas we want it to remain the same size). Is there a way so it keeps all the cells the same size throughout?
Tkinter event for precise mouse movement
I’m trying to develop a very basic Tkinter drawing app, but cannot find a good event to use to detect mouse movement.
How to remove the title bar of a tkinter application without making it full-screen or removing the taskbar icon?
I’m developing a tkinter application and would like to remove the title bar while keeping the window border intact and preserving the taskbar icon. Setting the window to full-screen or hiding the taskbar icon isn’t desirable for my application.
Adjusting frame size in tkinter grid layout
I have written a code in tkinter using grid layout in which my concern is with a frame that has scroll bar . I want it to expand to bottom of window by default . Here is the relevant code from tkinter import * class Application(Frame): def __init__(self, master=None): Frame.__init__(self, master) frtop=self.winfo_toplevel() #Flexible Toplevel of […]
Tkinter how to destroy Frame that is created from another class and used in the main class?
How do I destroy a frame which is created in a class that will be used in the main class?
adjusting contents of frame in tkinter grid layout using python
My aim is to stack a list of entries horizontally in frame using tkinter grid layout. Here is my code from tkinter import * class Application(Frame): def __init__(self, master=None): Frame.__init__(self, master) frtop=self.winfo_toplevel() #Flexible Toplevel of the window screen_width = self.winfo_screenwidth() screen_height = self.winfo_screenheight() print(“width=”+str(screen_width)+”, height=”+str(screen_height)) max_windows_size=str(screen_width)+”x”+str(screen_height) frtop.geometry(max_windows_size) self.grid() self.table_frame = Frame(self) self.table_frame.grid(column =0, row =0,sticky=’NSEW’) […]