最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

wxpython打開圖片并顯示(自己調(diào)試)

2020-03-17 15:12 作者:一心想當(dāng)網(wǎng)紅的李老師  | 我要投稿

# -*- coding: utf-8 -*-

"""

Created on Tue Mar 17 14:31:37 2020


@author: liyan

"""


import wx

import os



class picLog(wx.Frame):

? ? def __init__(self):

? ? ? ? wx.Frame.__init__(self,None,title='picLog',size=(640,480))

? ? ? ? self.SelBtn = wx.Button(self,label='>>',pos=(305,5),size=(80,25))

? ? ? ? self.SelBtn.Bind(wx.EVT_BUTTON,self.OnOpenFile)

? ? ? ? self.OkBtn = wx.Button(self,label='OK',pos=(405,5),size=(80,25))

? ? ? ? self.OkBtn.Bind(wx.EVT_BUTTON,self.Onpic)

? ? ? ? self.FileName = wx.TextCtrl(self,pos=(5,5),size=(230,25))

? ? ? ? self.panel = wx.Panel(self,pos=(30,30),size=(1320,960))


? ??

? ? def OnOpenFile(self,event):

? ? ? ? wildcard = 'All files(*.*)|*.*'

? ? ? ? dialog = wx.FileDialog(None,'select',os.getcwd(),'',wildcard,wx.FD_OPEN) ?#####這個(gè)部分新舊版本有變化

? ? ? ? if dialog.ShowModal() == wx.ID_OK:

? ? ? ? ? ? self.FileName.SetValue(dialog.GetPath())

? ? ? ? ? ? dialog.Destroy

? ? ? ??

? ??

? ? def Onpic(self,event):

? ? ? ? panel=wx.Panel(self,pos=(30,30),size=(1320,960))

? ? ? ? img3= wx.Image(self.FileName.GetValue(), wx.BITMAP_TYPE_ANY).ConvertToBitmap()

? ? ? ? show3=wx.StaticBitmap(self, -1, img3,pos=(20, 0),size=(1080,600))

? ? ? ? ?




if __name__=='__main__':

? ? app = wx.App()

? ? SiteFrame = picLog()

? ? SiteFrame.Show()

? ? app.MainLoop()


wxpython打開圖片并顯示(自己調(diào)試)的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
沂水县| 海南省| 南汇区| 新干县| 措美县| 锦屏县| 同德县| 襄汾县| 莆田市| 中西区| 碌曲县| 十堰市| 洛南县| 林周县| 怀远县| 天等县| 曲麻莱县| 六安市| 珲春市| 太原市| 安义县| 星子县| 包头市| 金川县| 商丘市| 信宜市| 随州市| 岢岚县| 都昌县| 枞阳县| 甘孜县| 海宁市| 高台县| 广宁县| 衡阳市| 交城县| 武冈市| 彰化市| 汤原县| 临泉县| 扎鲁特旗|