当前位置: 首页>>代码示例>>Python>>正文


Python wx.BITMAP_TYPE_ICO属性代码示例

本文整理汇总了Python中wx.BITMAP_TYPE_ICO属性的典型用法代码示例。如果您正苦于以下问题:Python wx.BITMAP_TYPE_ICO属性的具体用法?Python wx.BITMAP_TYPE_ICO怎么用?Python wx.BITMAP_TYPE_ICO使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在wx的用法示例。


在下文中一共展示了wx.BITMAP_TYPE_ICO属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BITMAP_TYPE_ICO [as 别名]
def __init__(self):
        wx.Frame.__init__(self, None,
                          pos=wx.DefaultPosition, size=wx.Size(450, 100),
                          style=wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION |
                          wx.CLOSE_BOX | wx.CLIP_CHILDREN,
                          title="BRUNO")
        panel = wx.Panel(self)

        ico = wx.Icon('boy.ico', wx.BITMAP_TYPE_ICO)
        self.SetIcon(ico)

        my_sizer = wx.BoxSizer(wx.VERTICAL)
        lbl = wx.StaticText(panel,
                            label="Bienvenido Sir. How can I help you?")
        my_sizer.Add(lbl, 0, wx.ALL, 5)
        self.txt = wx.TextCtrl(panel, style=wx.TE_PROCESS_ENTER,
                               size=(400, 30))
        self.txt.SetFocus()
        self.txt.Bind(wx.EVT_TEXT_ENTER, self.OnEnter)
        my_sizer.Add(self.txt, 0, wx.ALL, 5)
        panel.SetSizer(my_sizer)
        self.Show()
        speak.Speak('''Welcome back Sir, Broono at your service.''') 
开发者ID:ab-anand,项目名称:Bruno,代码行数:25,代码来源:daily.py

示例2: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BITMAP_TYPE_ICO [as 别名]
def __init__(self, wxapp, bgapp, iconfilename):
        wx.TaskBarIcon.__init__(self)
        self.bgapp = bgapp
        self.wxapp = wxapp
        self.icons = wx.IconBundle()
        self.icon = wx.Icon(iconfilename, wx.BITMAP_TYPE_ICO)
        self.icons.AddIcon(self.icon)
        self.Bind(wx.EVT_TASKBAR_LEFT_UP, self.OnLeftClicked)
        if sys.platform != 'darwin':
            self.SetIcon(self.icon, self.bgapp.appname)
        else:
            menuBar = wx.MenuBar()
            filemenu = wx.Menu()
            item = filemenu.Append(-1, 'E&xit', 'Terminate the program')
            self.Bind(wx.EVT_MENU, self.OnExit, item)
            wx.App.SetMacExitMenuItemId(item.GetId()) 
开发者ID:alesnav,项目名称:p2ptv-pi,代码行数:18,代码来源:systray.py

示例3: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BITMAP_TYPE_ICO [as 别名]
def __init__(self, parent, MainFrame, workingdir):
        wx.TaskBarIcon.__init__(self)
        self.parentApp = parent
        self.MainFrame = MainFrame
        self.wx_id = wx.NewId()

        if ON_WINDOWS:
            icon_file = os.path.join(
                            os.path.abspath(workingdir),
                            'chronolapse.ico'
                        )
        else:
            icon_file = os.path.join(
                            os.path.abspath(workingdir),
                            'chronolapse_24.ico'
                        )
        self.SetIcon(wx.Icon(icon_file, wx.BITMAP_TYPE_ICO), 'Chronolapse')
        self.CreateMenu() 
开发者ID:collingreen,项目名称:chronolapse,代码行数:20,代码来源:chronolapse.py

示例4: OnInit

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BITMAP_TYPE_ICO [as 别名]
def OnInit(self):
        self.running = True
        if profile:
            try:
                os.unlink(prof_file_name)
            except:
                pass
            self.prof = Profiler()
            self.prof.enable()
        
        wx.the_app = self
        self._DoIterationId = wx.NewEventType()
        self.Connect(-1, -1, self._DoIterationId, self._doIteration)
        self.evt = wx.PyEvent()
        self.evt.SetEventType(self._DoIterationId)
        self.event_queue = []

        # this breaks TreeListCtrl, and I'm too lazy to figure out why
        #wx.IdleEvent_SetMode(wx.IDLE_PROCESS_SPECIFIED)
        # this fixes 24bit-color toolbar buttons
        wx.SystemOptions_SetOptionInt("msw.remap", 0)
        icon_path = os.path.join(image_root, 'bittorrent.ico')
        self.icon = wx.Icon(icon_path, wx.BITMAP_TYPE_ICO)
        return True 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:26,代码来源:__init__.py

示例5: _init_properties

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BITMAP_TYPE_ICO [as 别名]
def _init_properties(self):
    # self.SetTitle(self.build_spec['program_name'])
    # self.SetSize(self.build_spec['default_size'])
    # # self.SetMinSize((400, 300))
    self.icon = wx.Icon(image_repository.program_icon, wx.BITMAP_TYPE_ICO)
    self.SetIcon(self.icon) 
开发者ID:ME-ICA,项目名称:me-ica,代码行数:8,代码来源:base_window.py

示例6: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BITMAP_TYPE_ICO [as 别名]
def __init__(self):

			self.option=sys.argv[1]
			self.text_sms=sys.argv[2]
			self.text_sms=unicode(self.text_sms,'utf-8')
			self.phone=sys.argv[3]

			self.conf = Conf()
			self.home = self.conf.home
			self.currentpath = self.home+self.conf.get('GENERAL', 'op_folder')+'/openplotter'

			Language(self.conf)

			wx.Frame.__init__(self, None, title=_('Test SMS'), size=(500,260))

			self.SetFont(wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
			
			self.icon = wx.Icon(self.currentpath+'/openplotter.ico', wx.BITMAP_TYPE_ICO)
			self.SetIcon(self.icon)

			self.CreateStatusBar()

			self.text=wx.StaticText(self, label=_('Error'), pos=(10, 10))

			self.output = wx.TextCtrl(self, style=wx.TE_MULTILINE|wx.TE_READONLY|wx.TE_DONTWRAP, size=(480,110), pos=(10,50))
			
			self.button_close =wx.Button(self, label=_('Close'), pos=(300, 170))
			self.Bind(wx.EVT_BUTTON, self.close, self.button_close)

			self.button_calculate =wx.Button(self, label=_('Start'), pos=(400, 170))
			self.Bind(wx.EVT_BUTTON, self.calculate, self.button_calculate)

			if self.option=='i': 
				self.text.SetLabel(_('Press start to check the settings and connect to the GSM device'))

			if self.option=='t':
				self.text.SetLabel(_('Press start to send the text "').decode('utf8')+self.text_sms+_('"\nto the number "').decode('utf8')+self.phone+'"')

			self.Centre() 
开发者ID:sailoog,项目名称:openplotter,代码行数:41,代码来源:test_sms.py

示例7: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BITMAP_TYPE_ICO [as 别名]
def __init__(self,
                  parent,
                  ID=wx.NewId(),
                  pos=wx.DefaultPosition,
                  size=wx.DefaultSize,
                  style=0,
                  clientpanel=None):
        """Constructor. Initializes a smartcard or reader tree control."""
        wx.TreeCtrl.__init__(
            self, parent, ID, pos, size, wx.TR_SINGLE | wx.TR_NO_BUTTONS)

        self.clientpanel = clientpanel
        self.parent = parent

        isz = (16, 16)
        il = wx.ImageList(isz[0], isz[1])
        self.capindex = il.Add(
            wx.ArtProvider_GetBitmap(wx.ART_HELP_BOOK, wx.ART_OTHER, isz))
        self.fldrindex = il.Add(
            wx.ArtProvider_GetBitmap(wx.ART_FOLDER, wx.ART_OTHER, isz))
        self.fldropenindex = il.Add(
            wx.ArtProvider_GetBitmap(wx.ART_FILE_OPEN, wx.ART_OTHER, isz))
        if None != ICO_SMARTCARD:
            self.cardimageindex = il.Add(
                wx.Bitmap(ICO_SMARTCARD, wx.BITMAP_TYPE_ICO))
        if None != ICO_READER:
            self.readerimageindex = il.Add(
                wx.Bitmap(ICO_READER, wx.BITMAP_TYPE_ICO))
        self.il = il
        self.SetImageList(self.il) 
开发者ID:LudovicRousseau,项目名称:pyscard,代码行数:32,代码来源:CardAndReaderTreePanel.py

示例8: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BITMAP_TYPE_ICO [as 别名]
def __init__(self, parent):
        """Constructor, creating the reader toolbar."""
        wx.ToolBar.__init__(
           self,
           parent,
           pos=wx.DefaultPosition,
           size=wx.DefaultSize,
           style=wx.SIMPLE_BORDER | wx.TB_HORIZONTAL | wx.TB_FLAT | wx.TB_TEXT,
           name='Reader Toolbar')

        # create bitmaps for toolbar
        tsize = (16, 16)
        if None != ICO_READER:
            bmpReader = wx.Bitmap(ICO_READER, wx.BITMAP_TYPE_ICO)
        else:
            bmpReader = wx.ArtProvider_GetBitmap(
                wx.ART_HELP_BOOK, wx.ART_OTHER, tsize)
        if None != ICO_SMARTCARD:
            bmpCard = wx.Bitmap(ICO_SMARTCARD, wx.BITMAP_TYPE_ICO)
        else:
            bmpCard = wx.ArtProvider_GetBitmap(
                wx.ART_HELP_BOOK, wx.ART_OTHER, tsize)
        self.readercombobox = ReaderComboBox(self)

        # create and add controls
        self.AddSimpleTool(
            10,
            bmpReader,
            "Select smart card reader",
            "Select smart card reader")
        self.AddControl(self.readercombobox)
        self.AddSeparator()
        self.AddSimpleTool(
            20,
            bmpCard, "Connect to smartcard",
            "Connect to smart card")
        self.AddSeparator()

        self.Realize() 
开发者ID:LudovicRousseau,项目名称:pyscard,代码行数:41,代码来源:ReaderToolbar.py

示例9: get_icon_bundle

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BITMAP_TYPE_ICO [as 别名]
def get_icon_bundle():
    """Return the Bitcoin program icon bundle."""
    return wx.IconBundleFromFile(os.path.join(get_module_path(), "logo.ico"), wx.BITMAP_TYPE_ICO) 
开发者ID:theRealTacoTime,项目名称:poclbm,代码行数:5,代码来源:guiminer.py

示例10: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BITMAP_TYPE_ICO [as 别名]
def __init__(self, wxapp, bgapp, iconfilename):
        wx.TaskBarIcon.__init__(self)
        self.bgapp = bgapp
        self.wxapp = wxapp
        self.icons = wx.IconBundle()
        self.icon = wx.Icon(iconfilename, wx.BITMAP_TYPE_ICO)
        self.icons.AddIcon(self.icon)
        if sys.platform != 'darwin':
            self.SetIcon(self.icon, self.bgapp.appname)
        else:
            menuBar = wx.MenuBar()
            filemenu = wx.Menu()
            item = filemenu.Append(-1, 'E&xit', 'Terminate the program')
            self.Bind(wx.EVT_MENU, self.OnExit, item)
            wx.App.SetMacExitMenuItemId(item.GetId()) 
开发者ID:alesnav,项目名称:p2ptv-pi,代码行数:17,代码来源:createlivestream_wx.py

示例11: _init_properties

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BITMAP_TYPE_ICO [as 别名]
def _init_properties(self):
    self.SetTitle(self.build_spec['program_name'])
    self.SetSize(self.build_spec['default_size'])
    # self.SetMinSize((400, 300))
    self.icon = wx.Icon(image_repository.icon, wx.BITMAP_TYPE_ICO)
    self.SetIcon(self.icon) 
开发者ID:lrq3000,项目名称:pyFileFixity,代码行数:8,代码来源:base_window.py

示例12: _init_properties

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BITMAP_TYPE_ICO [as 别名]
def _init_properties(self):
    self.SetMinSize((400, 300))
    self.icon = wx.Icon(image_store.icon, wx.BITMAP_TYPE_ICO)
    self.SetIcon(self.icon) 
开发者ID:lrq3000,项目名称:pyFileFixity,代码行数:6,代码来源:display_main.py

示例13: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BITMAP_TYPE_ICO [as 别名]
def __init__(self, parent, manager = None, filesOpen = []):
        if manager is None:
            NodeEditorTemplate.__init__(self, NodeManager(), self, True)
        else:
            NodeEditorTemplate.__init__(self, manager, self, False)
        self._init_ctrls(parent)
        self.HtmlFrameOpened = []
        
        icon = wx.Icon(os.path.join(ScriptDirectory,"networkedit.ico"),wx.BITMAP_TYPE_ICO)
        self.SetIcon(icon)
        
        if self.ModeSolo:
            for filepath in filesOpen:
                result = self.Manager.OpenFileInCurrent(os.path.abspath(filepath))
                if isinstance(result, (IntType, LongType)):
                    new_editingpanel = EditingPanel(self.FileOpened, self, self.Manager)
                    new_editingpanel.SetIndex(result)
                    self.FileOpened.AddPage(new_editingpanel, "")
        else:
            for index in self.Manager.GetBufferIndexes():
                new_editingpanel = EditingPanel(self.FileOpened, self, self.Manager)
                new_editingpanel.SetIndex(index)
                self.FileOpened.AddPage(new_editingpanel, "")
        
        if self.Manager.GetBufferNumber() > 0:
            window = self.FileOpened.GetPage(0)
            if window:
                self.Manager.ChangeCurrentNode(window.GetIndex())
                self.FileOpened.SetSelection(0)
        
        if self.Manager.CurrentDS302Defined():
            self.EditMenu.Enable(ID_OBJDICTEDITEDITMENUDS302PROFILE, True)
        else:
            self.EditMenu.Enable(ID_OBJDICTEDITEDITMENUDS302PROFILE, False)
        self.RefreshEditMenu()
        self.RefreshBufferState()
        self.RefreshProfileMenu()
        self.RefreshTitle()
        self.RefreshMainMenu() 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:41,代码来源:objdictedit.py

示例14: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BITMAP_TYPE_ICO [as 别名]
def __init__(self, parent, nodelist = None, projectOpen = None):
        if nodelist is None:
            NetworkEditorTemplate.__init__(self, NodeList(NodeManager()), self, True)
        else:
            NetworkEditorTemplate.__init__(self, nodelist, self, False)
        self._init_ctrls(parent)
        self.HtmlFrameOpened = []
        
        icon = wx.Icon(os.path.join(ScriptDirectory,"networkedit.ico"),wx.BITMAP_TYPE_ICO)
        self.SetIcon(icon)
                 
        if self.ModeSolo:
            if projectOpen:
                result = self.NodeList.LoadProject(projectOpen)
                if not result:
                    self.NodeList.SetCurrentSelected(0)
                    self.RefreshNetworkNodes()
                    self.RefreshProfileMenu()
            else:
                self.NodeList = None
        else:
            self.NodeList.SetCurrentSelected(0)
            self.RefreshNetworkNodes()
            self.RefreshProfileMenu()
        self.NetworkNodes.SetFocus()
        
        self.RefreshBufferState()
        self.RefreshTitle()
        self.RefreshMainMenu() 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:31,代码来源:networkedit.py

示例15: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BITMAP_TYPE_ICO [as 别名]
def __init__(self, parent, fileOpen=None):
        """ Constructor of the PLCOpenEditor class.

        :param parent: The parent window.
        :param fileOpen: The filepath to open if no controler defined (default: None).
        """
        self.icon = wx.Icon(os.path.join(beremiz_dir, "images", "poe.ico"), wx.BITMAP_TYPE_ICO)
        IDEFrame.__init__(self, parent)

        result = None

        # Open the filepath if defined
        if fileOpen is not None:
            fileOpen = DecodeFileSystemPath(fileOpen, False)
            if os.path.isfile(fileOpen):
                # Create a new controller
                controler = PLCControler()
                result = controler.OpenXMLFile(fileOpen)
                self.Controler = controler
                self.LibraryPanel.SetController(controler)
                self.ProjectTree.Enable(True)
                self.PouInstanceVariablesPanel.SetController(controler)
                self._Refresh(PROJECTTREE, POUINSTANCEVARIABLESPANEL, LIBRARYTREE)

        # Define PLCOpenEditor icon
        self.SetIcon(self.icon)

        self.Bind(wx.EVT_CLOSE, self.OnCloseFrame)

        self._Refresh(TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU)

        if result is not None:
            (num, line) = result
            self.ShowErrorMessage(_("PLC syntax error at line {a1}:\n{a2}").format(a1=num, a2=line)) 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:36,代码来源:PLCOpenEditor.py


注:本文中的wx.BITMAP_TYPE_ICO属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。