Informatika va grafika
332 subscribers
324 photos
761 videos
689 files
210 links
Dasturlash: c++, java, delphi, javascript, VBA, vb#,c#
Grafika: 3ds max, flash8, Swishmax, coreldraw, photoshop.
Informatika: grafik ob ‘ektlarni yaratish Pascal tilini o‘rganish, Excelda formalar yaratish, HTML, CSS bilan tanishish Admin @Algoritmchi
Download Telegram
from simpletk import *
from tkinter import filedialog

app = TApplication("Просмотр рисунков")
app.position = (200, 200)
app.size = (300, 300)

panel = TPanel(app, relief="raised", height=35, bd=1)
panel.align = "top"

image = TImage(app, bg="white")
image.align = "client"
#image.picture = "flower.gif"

def selectFile(sender):
fname = filedialog.askopenfilename(
filetypes=[("Файлы GIF", "*.gif"),
("Все файлы", "*.*")] )
if fname:
image.picture = fname

openBtn = TButton(panel, width=15, text="Открыть файл")
openBtn.position = (5, 5)
openBtn.onClick = selectFile

def cbChanged(sender):
image.center = sender.checked
image.redrawImage()

centerCb = TCheckBox(panel,text="В центре")
centerCb.position = (115, 5)
centerCb.onChange = cbChanged

app.Run()