#Tkinter
Explore tagged Tumblr posts
Text
Custom Tkinter Cursor
To set an image as a custom mouse cursor for you Python Tkinter App, you can follow these steps:
for a detailed explanation, you can watch this video:
2 notes
·
View notes
Text
That feeling when your boss asks you if you’ve made any breakthroughs on any of the Python tools you maintain and the answer is yes, but the breakthrough you made was finally finding a forum half explaining a niche Tcl function which you then spent the afternoon running experimenting with till you understood it enough to use it to bastardize somebody else’s custom tkinter text widget.
This allows me to make a textbox that has both line numbers and a scrollbar.
#To clarify this is not the boss I have feelings for#But technically he is also not my boss#…fuck why does this keep happening#Note to self: update the blog’s dramatis personae#Also fuck tk/Tcl#And also tkinter and the fact all of the docs are unhelpful#Though tbh that’s not really tkinter’s fault#tkinter
2 notes
·
View notes
Text
Pandas . . . . for more information and tutorial https://bit.ly/3jqTlRP check the above link
2 notes
·
View notes
Text
day 21-23 | friday | 7/4/23
starting to explore coding with tkinter! like with turtle, it's to do with visuals, but this is more web-based. these past few day's program exercises: a shopping list, a unit price calculator, and the easiest join-the-dots game (you're the one placing the dots, which connects the previous dot to the one you just put down). that join-the-dots one isn't tkinter obviously.
the last snip is of the bullseye program that was mentioned earlier on in 100doc since i realised i only posted the code and not what it actually looked like.
i hope everyone else enjoyed their good friday (i nearly forgot about it tbh) and is excited for easter! :)
24 notes
·
View notes
Text
was playing around w/ school assignment, got this cool pattern by accident
2 notes
·
View notes
Text
Python Projects with source code
Hello Python enthusiasts!
I'm excited to announce that my website, SamCodeHub, is now live and ready to be explored!
Website link: samcodehub.com
What you'll find on the site:
Programming tutorials in Python. Over 400 fascinating Python projects with source code. Step-by-step guides for beginners and advanced users. Whether you're just starting your Python journey or looking to improve your skills, SamCodeHub has something for everyone!
I would be incredibly grateful if you could take a moment to visit the website and share your feedback and opinions. Your input means a lot to me!
So, click on the link, dive into the world of Python, and let me know what you think! Feel free to share it with other Python enthusiasts as well!
Happy coding!
2 notes
·
View notes
Text
Python for Beginners: Creating a Desktop App in Python
Have a look at this blog where I create a Python app to convert RGB image to grayscale.
A couple of weeks ago, I published a blog on creating a GUI in Python using Tkinter. I thought of kicking it up a notch and integration the function of OpenCV in my Python app. So I decided to create a small desktop app where you can upload an image and convert it to grayscale with a click of a button. So get your IDE ready, grab a cup of coffee, and let’s turn our code into creativity! Tkinter…
View On WordPress
0 notes
Text
ok real question, does anyone know python? i got this project i have to turn in and it needs to be python and i have no idea what i'm doing. can anyone help
0 notes
Text
信用の建玉を自分ルールの中で所持現金からどれくらい建てられるか計算するやつと、
自分ルールの逆指値と指値の値を建単価から計算する計算機をtkinterで作った。
いちいち電卓で計算するのが邪魔くさいので。
逆指値の成行でやってたら不足金が発生しかけていてやばかった。
逆指値は指値でやりましょう。
あと、予定カレンダーhtmlのfaviconをKロゴにした。
0 notes
Text
Python Tkinter TK Widgets
All the TK widgets available by default. You don't have to install anything to use them:
For more details:
1 note
·
View note
Text
Using Python Defined Bitmaps with Labels
1 note
·
View note
Text
OpenCV . . . . for more information and tutorial https://bit.ly/3XAqJYt check the above link
0 notes
Text
今日の文書化〜Python GUIプログラミングの例題
例題を一つ作り文書化しました。 Tkinterと簡易的なデータベースを使った名簿のようなアプリケーションです。 Tkinterを見ていると昔のAWT (JavaのGUIフレームワークのようなもの)を思い出します。フォントが汚いとかUIのレイアウトが面倒臭いとかいろいろと嫌な気分になったものです。 Javaの出始めの頃はAppletのようなWebブラウザ上で動くものを作るとかいろいろやったものですが、GUI系やWeb系の開発では他の優れたものを使うようになりJavaを使うことはなくなりましたね。 Tkinterを拡張したライブラリーやFletのようなフレームワークもあるので、見栄えの良いアプリケーションを作る方法はあります。なのでTkinterはサラッとやって次に進む感じになるかもしれません。
View On WordPress
0 notes
Text
python a drag select region gui example in tkinter
import tkinter as tk # https://pythonprogrammingsnippets.tumblr.com class DragSelect: def __init__(self, canvas): self.canvas = canvas # handle drag buttons self.canvas.bind("", self.on_button_down) self.canvas.bind("", self.on_drag) self.canvas.bind("", self.on_button_up) # handle right mouse button to clear selection self.canvas.bind("", self.on_button_up_clear) self.selection_items = set() self.selection_box = None self.drag_start_xy = (0, 0) self.drag_end_xy = (0, 0) self.drag_cur_xy = (0, 0) self.select_rect_id = None def on_button_down(self, event): # track our mouse self.drag_start_xy = (event.x, event.y) self.drag_cur_xy = (event.x, event.y) # start making our select self.select_rect_id = self.canvas.create_rectangle(event.x, event.y, event.x, event.y, outline="light blue", width=2) def on_button_up_clear(self, event): # reset self.select_items self.selection_items = set() # outline all canvas items in black for item in self.canvas.find_all(): self.canvas.itemconfig(item, outline="black", width=1) def on_button_up(self, event): # track our mouse self.drag_end_xy = (event.x, event.y) self.drag_cur_xy = (event.x, event.y) # clear our select rect self.canvas.delete(self.select_rect_id) self.select_rect_id = None # clear our selection box if self.selection_box is not None: self.canvas.delete(self.selection_box) self.selection_box = None # output how many are selected print(len(self.selection_items)) def on_drag(self, event): # track our mouse self.drag_cur_xy = (event.x, event.y) # update our select rect self.canvas.coords(self.select_rect_id, self.drag_start_xy[0], self.drag_start_xy[1], self.drag_cur_xy[0], self.drag_cur_xy[1]) # highlight all elements that are under the selection box for item in self.canvas.find_overlapping(*self.drag_start_xy, *self.drag_cur_xy): # if item isn't our select box, highlight it if item != self.select_rect_id: self.canvas.itemconfig(item, outline="red", width=2) # add item to our selection self.selection_items.add(item) ## usage: root = tk.Tk() canvas = tk.Canvas(root, width=800, height=600, bg="white") root.title("Drag Select : Left mouse to drag select, Right mouse to clear selection") canvas.pack() DragSelect(canvas) for i in range(10): canvas.create_rectangle( 100 + i * 30, 100 + i * 30, 200 + i * 30, 200 + i * 30, fill="blue") root.mainloop()
#python#tkinter#gui#drag select#drag and drop#drag#drop#select#marquee#select region#drag region#drag select region#selection#dragging#dropping#mouse#buttons#button#mouse select#mouse selection#hid#ui#user interface#user#interface#python programming#mouse example#snippet#snippets#example
1 note
·
View note