-



Download 9,79 Mb.
Pdf ko'rish
bet51/64
Sana16.01.2022
Hajmi9,79 Mb.
#372467
1   ...   47   48   49   50   51   52   53   54   ...   64
Bog'liq
[Nichola Lacey] Python by Example Learning to Pro(1)

window.geometry
 and 
button.place
 lines. 
 
Now look at the window that this code will produce: 
 
The 
geometry
 line in the code determines the size of the window and the 
place
 line in 
the code determines the position of the individual item on the window. 


Challenges 124 - 132: Tkinter GUI 
1111 
 
 
 
Once the button is pressed it will run the “Call” subprogram and change the window to look 
as follows: 
 
 
 
 
  


1112 
 
Challenges 124 - 132: Tkinter GUI 
 
 
Example Code 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
from tkinter import * 
This line must go at the beginning of the program to import the Tkinter library. 
window = Tk() 
window.title(“Window Title”) 
window.geometry(“450x100”) 
Creates a window that will act as the 
display, referred to as “window”, adds a title 
and defines the size of the window. 
label = Label(text = “Enter number:”) 
Adds text to the screen displaying the message 
shown. 

Download 9,79 Mb.

Do'stlaringiz bilan baham:
1   ...   47   48   49   50   51   52   53   54   ...   64




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish