fa
Feedback
Python Tkinter

Python Tkinter

رفتن به کانال در Telegram
1 127
مشترکین
اطلاعاتی وجود ندارد24 ساعت
اطلاعاتی وجود ندارد7 روز
اطلاعاتی وجود ندارد30 روز

در حال بارگیری داده...

کانال‌های مشابه
هیچ داده‌ای
مشکلی وجود دارد؟ لطفاً صفحه را تازه کنید یا با مدیر پشتیبانی ما تماس بگیرید.
ابر برچسب‌ها
هیچ داده‌ای
مشکلی وجود دارد؟ لطفاً صفحه را تازه کنید یا با مدیر پشتیبانی ما تماس بگیرید.
اشارات ورودی و خروجی
---
---
---
---
---
---
جذب مشترکین
اوت '24
اوت '24
+5
در 0 کانال‌ها
ژوئیه '24
+51
در 0 کانال‌ها
Get PRO
ژوئن '24
+26
در 0 کانال‌ها
Get PRO
مه '24
+31
در 0 کانال‌ها
Get PRO
آوریل '24
+35
در 0 کانال‌ها
Get PRO
مارس '24
+57
در 0 کانال‌ها
Get PRO
فوریه '24
+80
در 0 کانال‌ها
Get PRO
ژانویه '240
در 0 کانال‌ها
Get PRO
دسامبر '230
در 0 کانال‌ها
Get PRO
نوامبر '230
در 0 کانال‌ها
Get PRO
اکتبر '230
در 0 کانال‌ها
Get PRO
سپتامبر '230
در 0 کانال‌ها
Get PRO
اوت '230
در 0 کانال‌ها
Get PRO
ژوئیه '230
در 0 کانال‌ها
Get PRO
ژوئن '230
در 0 کانال‌ها
Get PRO
مه '230
در 0 کانال‌ها
Get PRO
آوریل '230
در 0 کانال‌ها
Get PRO
مارس '230
در 0 کانال‌ها
Get PRO
فوریه '230
در 0 کانال‌ها
Get PRO
ژانویه '230
در 0 کانال‌ها
Get PRO
دسامبر '220
در 0 کانال‌ها
Get PRO
نوامبر '220
در 0 کانال‌ها
Get PRO
اکتبر '220
در 0 کانال‌ها
Get PRO
سپتامبر '220
در 0 کانال‌ها
Get PRO
اوت '22
+52
در 0 کانال‌ها
Get PRO
ژوئیه '220
در 0 کانال‌ها
Get PRO
ژوئن '220
در 0 کانال‌ها
Get PRO
مه '22
+21
در 0 کانال‌ها
Get PRO
آوریل '22
+262
در 0 کانال‌ها
Get PRO
مارس '220
در 0 کانال‌ها
Get PRO
فوریه '220
در 0 کانال‌ها
Get PRO
ژانویه '220
در 0 کانال‌ها
Get PRO
دسامبر '210
در 0 کانال‌ها
Get PRO
نوامبر '210
در 0 کانال‌ها
Get PRO
اکتبر '210
در 0 کانال‌ها
Get PRO
سپتامبر '210
در 0 کانال‌ها
Get PRO
اوت '210
در 0 کانال‌ها
Get PRO
ژوئیه '210
در 0 کانال‌ها
Get PRO
ژوئن '210
در 0 کانال‌ها
Get PRO
مه '210
در 0 کانال‌ها
Get PRO
آوریل '21
+21
در 0 کانال‌ها
Get PRO
مارس '21
+25
در 0 کانال‌ها
Get PRO
فوریه '21
+43
در 0 کانال‌ها
Get PRO
ژانویه '21
+51
در 0 کانال‌ها
Get PRO
دسامبر '20
+615
در 0 کانال‌ها
تاریخ
رشد مشترکین
اشارات
کانال‌ها
06 اوت+2
05 اوت0
04 اوت+1
03 اوت+1
02 اوت+1
01 اوت0
پست‌های کانال
photo content

2
Besides Frame, there is a similar class LabelFrame - a frame with a signature. Unlike a simple frame, it has a text property. … f_top = LabelFrame(text="Верх") f_bot = LabelFrame(text="Низ") …
0
3
Result
Result
0
4
Frames are placed on the main window, and widgets are placed in the frames: from tkinter import * root = Tk() f_top = Frame(root) f_bot = Frame(root) l1 = Label(f_top, width=7, height=4, bg='yellow', text="1") l2 = Label(f_top, width=7, height=4, bg='orange', text="2") l3 = Label(f_bot, width=7, height=4, bg='lightgreen', text="3") l4 = Label(f_bot, width=7, height=4, bg='lightblue', text="4") f_top.pack() f_bot.pack() l1.pack(side=LEFT) l2.pack(side=LEFT) l3.pack(side=LEFT) l4.pack(side=LEFT) root.mainloop()
0
5
The problem of the last two options is that if you need to place widgets in a square, that is, two on the top, two on the bottom exactly under the two upper ones, then this is problematic, if at all possible. Therefore resort to an auxiliary widget - a frame, which is generated from the class Frame. #pack #geometry #widgets
0
6
#pack #geometry #widgets
#pack #geometry #widgets
0
7
#pack #geometry #widgets
#pack #geometry #widgets
0
8
#pack #geometry #widgets
#pack #geometry #widgets
0
9
#pack #geometry #widgets
#pack #geometry #widgets
0
10
#pack #geometry #widgets
#pack #geometry #widgets
0
11
#pack #geometry #widgets The pack() method has a side parameter that takes one of four tkinter values - TOP, BOTTOM, LEFT, RIGHT. By default, when pack () does not specify side, its value is TOP. This causes the widgets to be placed vertically. Let's create four painted labels. ... l1 = Label(width=7, height=4, bg='yellow', text="1") l2 = Label(width=7, height=4, bg='orange', text="2") l3 = Label(width=7, height=4, bg='lightgreen', text="3") l4 = Label(width=7, height=4, bg='lightblue', text="4") ... and consider different combinations of side values:
0
12
#pack #geometry #widgets
#pack #geometry #widgets
0
13
#pack #geometry #widgets
#pack #geometry #widgets
0
14
#pack #geometry #widgets Example Try the following example by moving cursor on different buttons # !/usr/bin/python3 from tkinter import * root = Tk() frame = Frame(root) frame.pack() bottomframe = Frame(root) bottomframe.pack( side = BOTTOM ) redbutton = Button(frame, text = "Red", fg = "red") redbutton.pack( side = LEFT) greenbutton = Button(frame, text = "Brown", fg = "brown") greenbutton.pack( side = LEFT ) bluebutton = Button(frame, text = "Blue", fg = "blue") bluebutton.pack( side = LEFT ) blackbutton = Button(bottomframe, text = "Black", fg = "black") blackbutton.pack( side = BOTTOM) root.mainloop() When the above code is executed, it produces the following result ⬇️
0
15
Что выберешь?
0
16
Style Guide for Python Code (PEP8) This document gives coding conventions for the Python code comprising the standard library in the main Python distribution. https://www.python.org/dev/peps/pep-0008/
0
17
The most simple and popular is method pack() which is in all widget-objects. If you don't pass argument to pack() all widgets will located vertical, one under one. That object who first called pack() will be at the top. Who will be second - under first etc. Here is the list of possible options : * expand − When set to true, widget expands to fill any space not otherwise used in widget's parent. * fill − Determines whether widget fills any extra space allocated to it by the packer, or keeps its own minimal dimensions: NONE (default), X (fill only horizontally), Y (fill only vertically), or BOTH (fill both horizontally and vertically). * side − Determines which side of the parent widget packs against: TOP (default), BOTTOM, LEFT, or RIGHT. * ipadx and ipady - internal indents * padx and pady - external indents * anchor - used to define where text is positioned relative to a reference point. List of possible constants : NW, N, NE, W, CENTER, E, SW, S, SE (abbreviation of : north, south, east, west) #pack #geometry #widgets
0
18
#pack #grid #place #geometry #widgets
#pack #grid #place #geometry #widgets
0
19
Geometry manager organizes widgets in blocks before placing them in the parent widget. If you don't use any geometry manager for element of interface it don't show up in window There are three geometry managers: 1) pack () 2) grid () 3) place () At the same time in the same window (or any other parent widget) you can't combine different managers. For example, if you started placing widgets with the pack () method, then you shouldn't immediately use the grid () and place () methods. #pack #grid #place #geometry #widgets
0
20
#If we need download image with extension other than .png we must include library PIL (python image library) in our project from PIL import ImageTk master.image = ImageTk.PhotoImage(file='E:/pp/image2.jpg')
0