Python wx 模块,EmptyIcon() 实例源码

我们从Python开源项目中,提取了以下5个代码示例,用于说明如何使用wx.EmptyIcon()

项目:pyDataView    作者:edwardsmith999    | 项目源码 | 文件源码
def __init__(self, parent=None, fdir='./', title='pyDataViewer', 
                 size=(800,600), **kwargs):

        wx.Frame.__init__(self,parent,title=title,size=size)
        try:
            _icon = wx.EmptyIcon()
            _icon.CopyFromBitmap(
                # postproclib.visualiser.__path__ (pplvpath) is a list
                wx.Bitmap(pplvpath[0]+"/logo.gif", wx.BITMAP_TYPE_ANY)
            )
            self.SetIcon(_icon)
        except IOError:
            print('Couldn\'t load icon')

        self.dirchooser = DirectoryChooserPanel(self, fdir)

        self.vbox = wx.BoxSizer(wx.VERTICAL)
        self.vbox.Add(self.dirchooser, 0, wx.EXPAND, 0)
        self.SetSizer(self.vbox)

        self.visualiserpanel = None
        self.new_visualiserpanel(fdir)
        self.fdir = fdir

        self.set_bindings()
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: Login.__set_properties
        self.SetTitle("Login")
        #_icon = wx.EmptyIcon()
        #_icon.CopyFromBitmap(wx.Bitmap("/media/f67bc164-f440-4c0f-9e9b-3ad70ff1adc2/home/asif/Desktop/waiter animation/2.gif", wx.BITMAP_TYPE_ANY))
        #self.SetIcon(_icon)
        self.SetSize((462, 239))
        self.SetFocus()
        self.label_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_1.SetSelection(0)
        self.label_2.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_1.SetMinSize((185, 30))
        self.button_1.SetMinSize((85, 35))
        self.button_1.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Ubuntu"))
        self.button_2.SetMinSize((85, 35))
        self.button_2.Disable()
        # end wxGlade
项目:code    作者:ActiveState    | 项目源码 | 文件源码
def Get(self,l,r):
        s=""+self.s_line
        for i in range(5):
            if i<(5-l):
                sl = self.sl_off
            else:
                sl = self.sl_on

            if i<(5-r):
                sr = self.sr_off
            else:
                sr = self.sr_on

            s+=self.s_border+sl+self.s_point+sr+self.s_point
            s+=self.s_border+sl+self.s_point+sr+self.s_point
            s+=self.s_line

        image = wx.EmptyImage(16,16)
        image.SetData(s)

        bmp = image.ConvertToBitmap()
        bmp.SetMask(wx.Mask(bmp, wx.WHITE)) #sets the transparency colour to white 

        icon = wx.EmptyIcon()
        icon.CopyFromBitmap(bmp)

        return icon

##
# The TaskBarIcon class
#
项目:ChiantiPy    作者:chianti-atomic    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: ui_choice2Dialog.__set_properties
        self.SetTitle("ChiantiPy")
        _icon = wx.EmptyIcon()
        imagefile = os.path.join(chianti.__path__[0], "images/chianti2.png")
        _icon.CopyFromBitmap(wx.Bitmap(imagefile, wx.BITMAP_TYPE_ANY))
        self.SetIcon(_icon)
        self.SetSize((448, 556))
        # end wxGlade
项目:jasper-modules    作者:mattcurrycom    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: MyFrame.__set_properties
        self.SetTitle(_("frame_1"))
        _icon = wx.EmptyIcon()
        _icon.CopyFromBitmap(wx.Bitmap("/home/john/Pictures/jasper gui jarvis/jarvisrotator.png", wx.BITMAP_TYPE_ANY))
        self.SetIcon(_icon)
        # end wxGlade