Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Snippets] Added tkinter snippet #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
technoph1le merged 4 commits into quicksnip-dev:main from legopitstop:main
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions snippets/python/[tkinter]/basics/hello-world.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Hello, World!
description: Creates a basic Tkinter window with a "Hello, World!" label.
author: Legopitstop
tags: app,hello-world,object-oriented
---

```py
from tkinter import Tk, Label

class App(Tk):
def __init__(self):
Tk.__init__(self)
self.geometry("100x100")

self.lbl = Label(self, text='Hello, World!')
self.lbl.pack(expand=1)

# Usage:
root = App()
root.mainloop()
```
1 change: 1 addition & 0 deletions snippets/python/[tkinter]/icon.svg
View file Open in desktop
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[フレーム]
Loading

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /