Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Updating tkinter text
Post: RE: Updating tkinter text
It works also like this:
import tkinter as tk
import time
def get_time(canvas):
show = time.strftime(f'%I:%M:%S %P')
canvas.itemconfig(var, text=show)
canvas.after(1000, get_time, canvas... |
|
wuf |
GUI |
5 |
6,027 |
Nov-24-2022, 07:22 PM |
|
|
Thread: _tkinter.TclError: bitmap "Icon.gif" not defined
Post: RE: Help with Tkinter
Hi djwilson0495
img = PhotoImage(file='Icon.gif')
window.tk.call('wm', 'iconphoto', window._w, img)Tested under Ubuntu 18.04 only!
wuf :-) |
|
wuf |
GUI |
2 |
12,967 |
Aug-05-2020, 02:27 PM |
|
|
Thread: Icon in tkinter
Post: RE: Icon in tkinter
Hi menator01
Sorry for my late answer. You are right for instance by Ubuntu 18.04 the icon of an apllication das not appear on its window title bar but in the Top bar of an desktop in witch the appli... |
|
wuf |
GUI |
8 |
4,977 |
May-03-2020, 02:01 PM |
|
|
Thread: Icon in tkinter
Post: RE: Icon in tkinter
Hi menator01
Where does the object RootWindow come from? I can't see its creation in your code snippet.
wuf :-) |
|
wuf |
GUI |
8 |
4,977 |
Apr-29-2020, 08:20 AM |
|
|
Thread: Tkinter Winget python text
Post: RE: Tkinter Winget python text
Hi Marc
Try out the following snippet:
from tkinter import *
root = Tk()
root.geometry('180x120')
texte = "***Pret***\n"
## winget texte
Console = Text(root,height=5, width=20, wrap... |
|
wuf |
GUI |
5 |
2,657 |
Mar-13-2020, 09:24 AM |
|
|
Thread: How to get the selected item from Listbox and convert it to int?
Post: RE: How to get the selected item from Listbox and ...
Ok Jionni
Lets make a simple application. By activating the button the app will multiply your listbox selection witch is stored in the variable 'b' with the constant PI:
import tkinter as tk
# Const... |
|
wuf |
GUI |
8 |
5,154 |
Feb-16-2020, 11:23 PM |
|
|
Thread: How to get the selected item from Listbox and convert it to int?
Post: RE: How to get the selected item from Listbox and ...
OK Jionni
May be this script does show more about the situation:
from tkinter import*
root=Tk()
sizex = 600
sizey = 400
posx = 100
posy = 100
root.wm_geometry("%dx%d+%d+%d" % (sizex, sizey, pos... |
|
wuf |
GUI |
8 |
5,154 |
Feb-16-2020, 05:26 PM |
|
|
Thread: How to get the selected item from Listbox and convert it to int?
Post: RE: How to get the selected item from Listbox and ...
Hi Jionni
Please try out the following snippet:
from tkinter import*
root=Tk()
sizex = 600
sizey = 400
posx = 40
posy = 20
root.wm_geometry("%dx%d+%d+%d" % (sizex, sizey, posx, posy))
def Sho... |
|
wuf |
GUI |
8 |
5,154 |
Feb-16-2020, 10:39 AM |
|
|
Thread: The coordinates of the Entry widget (canvas) when moving
Post: RE: The coordinates of the Entry widget (canvas) w...
Ok berckut72
So far I understood what you wrote in English. English is also not my main language. Thanks to google translator, I hope that my english is understood to some extent :-)
As you can see i... |
|
wuf |
GUI |
8 |
5,947 |
Jan-07-2020, 08:40 AM |
|
|
Thread: The coordinates of the Entry widget (canvas) when moving
Post: RE: The coordinates of the Entry widget (canvas) w...
Hi berckut72
If you whant to move a entry widget on a canvas like an other canvas object as text, images or geometric figures you must enbed the entry widget in a canvas object called window. To move... |
|
wuf |
GUI |
8 |
5,947 |
Jan-06-2020, 08:45 PM |
|
|
Thread: The coordinates of the Entry widget (canvas) when moving
Post: RE: The coordinates of the Entry widget (canvas) w...
Hi berckut72
Here something to experiment with. Try to forget globals:
import tkinter as tk
root = tk.Tk()
root.geometry('600x800+10+10')
root.resizable(width=False, height=False)
def build_canvas_... |
|
wuf |
GUI |
8 |
5,947 |
Jan-06-2020, 11:44 AM |
|
|
Thread: Accessing Entry with get Function
Post: RE: Accessing Entry with get Function
Hi nexgenskydiver
Some possible modifications:
# Modified in (class PreDataPage)
b1 = Button(planformView, text='Get New Entry', command = lambda:printNewEntry(*CDvars))
b1.pa... |
|
wuf |
GUI |
1 |
1,632 |
Oct-07-2019, 09:21 AM |
|
|
Thread: Spacing Between two labels are very far and Top label is not in Center using Tkinter
Post: RE: Spacing Between two labels are very far and To...
Hi barry76
Please note the adviced instructions of Larz60+. Try to present executable code snippets. If possible do not mix pack with grid.
For further studies i have placed here following script:
i... |
|
wuf |
GUI |
2 |
7,078 |
Jul-30-2019, 10:49 AM |
|
|
Thread: change background color of button
Post: RE: change background color of button
Hi ieee488
Here a further variant to play around with:
import tkinter as tk
root = tk.Tk()
def button_callback(state):
print('Button Callback', state)
class Button(tk.Button):
d... |
|
wuf |
GUI |
3 |
9,974 |
Jul-28-2019, 08:44 AM |
|
|
Thread: sleep(n) not working inside tkinter mainloop
Post: RE: sleep(n) not working inside tkinter mainloop
Hi roger31415
Here one variant without using time.sleep:
from tkinter import *
def display_loop(data, index=0):
display_item = data[index]
delay, text = display_item
test_label.configu... |
|
wuf |
GUI |
2 |
5,201 |
Jul-14-2019, 06:57 PM |
|
|
Thread: thinker button gui place next to each other
Post: RE: thinker button gui place next to each other
Hi jacklee26
When using the pack Layout Manager frames are mainly used as invisible containers to group individual widgets in a group. So you can handle the widget group when placing it with the help... |
|
wuf |
GUI |
9 |
4,743 |
Jul-04-2019, 07:48 AM |
|
|
Thread: thinker button gui place next to each other
Post: RE: thinker button gui place next to each other
Hi jacklee26
Just put your Buttons in a Frame (button_frame) and use side='left' for the Buttons placement:
button_frame = tk.Frame(my_gui)
button_frame.pack()
tk.Button(button_frame,text="Ping Test"... |
|
wuf |
GUI |
9 |
4,743 |
Jul-03-2019, 07:46 AM |
|
|
Thread: changing the frame colour
Post: RE: changing the frame colour
Hi nick123
Now it should work:
import tkinter as tk
root = tk.Tk()
root.geometry("100x100")
frame = tk.Frame(root, height=100, width=100)
def change_bg():
frame.config(background='red')
... |
|
wuf |
GUI |
4 |
16,599 |
Apr-25-2019, 04:35 PM |
|
|
Thread: adapt management grid mode to management pack mode
Post: RE: adapt management grid mode to management pack ...
Hi atlass218
Now the enlarged image will be displayed in a Toplevel window, by clicking on your small image in the textbox.
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
from functools import ... |
|
wuf |
GUI |
4 |
3,106 |
Apr-23-2019, 10:42 PM |
|
|
Thread: adapt management grid mode to management pack mode
Post: RE: adapt management grid mode to management pack ...
Hi atlass218
Here something to play with. To enlarge images you need the PIL-Module:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
from functools import partial
from tkinter import *
from PIL... |
|
wuf |
GUI |
4 |
3,106 |
Apr-23-2019, 08:41 PM |