Python wx.ID_ABOUT Examples

The following are 20 code examples of wx.ID_ABOUT(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module wx , or try the search function .
Example #1
Source File: PLCOpenEditor.py    From OpenPLC_Editor with GNU General Public License v3.0 6 votes vote down vote up
def _init_coll_HelpMenu_Items(self, parent):
        AppendMenu(parent, help='', id=wx.ID_HELP,
                   kind=wx.ITEM_NORMAL, text=_(u'PLCOpenEditor') + '\tF1')
        # AppendMenu(parent, help='', id=wx.ID_HELP_CONTENTS,
        #      kind=wx.ITEM_NORMAL, text=u'PLCOpen\tF2')
        # AppendMenu(parent, help='', id=wx.ID_HELP_CONTEXT,
        #      kind=wx.ITEM_NORMAL, text=u'IEC 61131-3\tF3')

        def handler(event):
            return wx.MessageBox(
                version.GetCommunityHelpMsg(),
                _(u'Community support'),
                wx.OK | wx.ICON_INFORMATION)

        id = wx.NewId()
        parent.Append(help='', id=id, kind=wx.ITEM_NORMAL, text=_(u'Community support'))
        self.Bind(wx.EVT_MENU, handler, id=id)

        AppendMenu(parent, help='', id=wx.ID_ABOUT,
                   kind=wx.ITEM_NORMAL, text=_(u'About'))
        self.Bind(wx.EVT_MENU, self.OnPLCOpenEditorMenu, id=wx.ID_HELP)
        # self.Bind(wx.EVT_MENU, self.OnPLCOpenMenu, id=wx.ID_HELP_CONTENTS)
        self.Bind(wx.EVT_MENU, self.OnAboutMenu, id=wx.ID_ABOUT) 
Example #2
Source File: gui.py    From four_flower with MIT License 6 votes vote down vote up
def makeMenuBar(self):
        fileMenu = wx.Menu()
        helloItem = fileMenu.Append(-1, "&Hello...\tCtrl-H",
                                    "Help string shown in status bar for this menu item")
        fileMenu.AppendSeparator()

        exitItem = fileMenu.Append(wx.ID_EXIT)
        helpMenu = wx.Menu()
        aboutItem = helpMenu.Append(wx.ID_ABOUT)

        menuBar = wx.MenuBar()
        menuBar.Append(fileMenu, "&File")
        menuBar.Append(helpMenu, "Help")

        self.SetMenuBar(menuBar)

        self.Bind(wx.EVT_MENU, self.OnHello, helloItem)
        self.Bind(wx.EVT_MENU, self.OnExit, exitItem)
        self.Bind(wx.EVT_MENU, self.OnAbout, aboutItem) 
Example #3
Source File: Control_Frameworks.py    From Python-GUI-Programming-Cookbook-Second-Edition with MIT License 6 votes vote down vote up
def wxPythonApp():
    import wx
    app = wx.App()
    frame = wx.Frame(None, -1, "wxPython GUI", size=(200,150))
    frame.SetBackgroundColour('white')
    frame.CreateStatusBar()
    menu= wx.Menu()
    menu.Append(wx.ID_ABOUT, "About", "wxPython GUI")
    menuBar = wx.MenuBar()
    menuBar.Append(menu,"File") 
    frame.SetMenuBar(menuBar)     
    frame.Show()
    
    runT = Thread(target=app.MainLoop)
    runT.setDaemon(True)    
    runT.start()
    print(runT)
    print('createThread():', runT.isAlive()) 
Example #4
Source File: wxPython_Wallpaper.py    From Python-GUI-Programming-Cookbook-Second-Edition with MIT License 6 votes vote down vote up
def __init__(self, parent):
        wx.Panel.__init__(self, parent)
        
        imageFile = 'Tile.bmp'
        self.bmp = wx.Bitmap(imageFile)
        # react to a resize event and redraw image
        parent.Bind(wx.EVT_SIZE, self.canvasCallback)
                
        menu = wx.Menu()
        menu.Append(wx.ID_ABOUT, "About", "wxPython GUI")
        menu.AppendSeparator()
        menu.Append(wx.ID_EXIT, "Exit", " Exit the GUI")
        menuBar = wx.MenuBar()
        menuBar.Append(menu, "File") 
        parent.SetMenuBar(menuBar)  
         
        self.textWidget = wx.TextCtrl(self, size=(280, 80), style=wx.TE_MULTILINE)
                 
        button = wx.Button(self, label="Create OpenGL 3D Cube", pos=(60, 100))
        self.Bind(wx.EVT_BUTTON, self.buttonCallback, button)  
         
        parent.CreateStatusBar() 
Example #5
Source File: wxPython_OpenGL_GUI.py    From Python-GUI-Programming-Cookbook-Second-Edition with MIT License 6 votes vote down vote up
def __init__(self, parent):
        wx.Panel.__init__(self, parent)
        
        menu = wx.Menu()
        menu.Append(wx.ID_ABOUT, "About", "wxPython GUI")
        menu.AppendSeparator()
        menu.Append(wx.ID_EXIT, "Exit", " Exit the GUI")
        menuBar = wx.MenuBar()
        menuBar.Append(menu, "File") 
        parent.SetMenuBar(menuBar)  
        
        self.textWidget = wx.TextCtrl(self, size=(280, 80), style=wx.TE_MULTILINE)
                
        button = wx.Button(self, label="Create OpenGL 3D Cube", pos=(60, 100))
        self.Bind(wx.EVT_BUTTON, self.buttonCallback, button)  
        
        parent.CreateStatusBar() 
Example #6
Source File: gui.py    From reading-frustum-pointnets-code with Apache License 2.0 6 votes vote down vote up
def makeMenuBar(self):
        fileMenu = wx.Menu()
        helloItem = fileMenu.Append(-1, "&Hello...\tCtrl-H",
                                    "Help string shown in status bar for this menu item")
        fileMenu.AppendSeparator()

        exitItem = fileMenu.Append(wx.ID_EXIT)
        helpMenu = wx.Menu()
        aboutItem = helpMenu.Append(wx.ID_ABOUT)

        menuBar = wx.MenuBar()
        menuBar.Append(fileMenu, "&File")
        menuBar.Append(helpMenu, "Help")

        self.SetMenuBar(menuBar)

        self.Bind(wx.EVT_MENU, self.OnHello, helloItem)
        self.Bind(wx.EVT_MENU, self.OnExit, exitItem)
        self.Bind(wx.EVT_MENU, self.OnAbout, aboutItem) 
Example #7
Source File: Main.py    From nodemcu-pyflasher with MIT License 6 votes vote down vote up
def _build_menu_bar(self):
        self.menuBar = wx.MenuBar()

        # File menu
        file_menu = wx.Menu()
        wx.App.SetMacExitMenuItemId(wx.ID_EXIT)
        exit_item = file_menu.Append(wx.ID_EXIT, "E&xit\tCtrl-Q", "Exit NodeMCU PyFlasher")
        exit_item.SetBitmap(images.Exit.GetBitmap())
        self.Bind(wx.EVT_MENU, self._on_exit_app, exit_item)
        self.menuBar.Append(file_menu, "&File")

        # Help menu
        help_menu = wx.Menu()
        help_item = help_menu.Append(wx.ID_ABOUT, '&About NodeMCU PyFlasher', 'About')
        self.Bind(wx.EVT_MENU, self._on_help_about, help_item)
        self.menuBar.Append(help_menu, '&Help')

        self.SetMenuBar(self.menuBar) 
Example #8
Source File: Control_Frameworks.py    From Python-GUI-Programming-Cookbook-Third-Edition with MIT License 6 votes vote down vote up
def wxPythonApp():
    import wx
    app = wx.App()
    frame = wx.Frame(None, -1, "wxPython GUI", size=(200,150))
    frame.SetBackgroundColour('white')
    frame.CreateStatusBar()
    menu= wx.Menu()
    menu.Append(wx.ID_ABOUT, "About", "wxPython GUI")
    menuBar = wx.MenuBar()
    menuBar.Append(menu,"File") 
    frame.SetMenuBar(menuBar)     
    frame.Show()
    
    runT = Thread(target=app.MainLoop)
    runT.setDaemon(True)    
    runT.start()
    print(runT)
    print('createThread():', runT.isAlive()) 
Example #9
Source File: wxPython_frame_GUI.py    From Python-GUI-Programming-Cookbook-Third-Edition with MIT License 5 votes vote down vote up
def __init__(self, parent, title, size=(200,100)):
        # Initialize super class
        wx.Frame.__init__(self, parent, title=title, size=size)
        
        # Change the frame color 
        self.SetBackgroundColour('white')
        
        # Create Status Bar
        self.CreateStatusBar() 

        # Create the Menu
        menu= wx.Menu()

        # Add Menu Items to the Menu
        menu.Append(wx.ID_ABOUT, "About", "wxPython GUI")
        menu.AppendSeparator()
        menu.Append(wx.ID_EXIT,"Exit"," Exit the GUI")

        # Create the MenuBar
        menuBar = wx.MenuBar()
        # Give the Menu a Title
        menuBar.Append(menu,"File") 
        
        # Connect the Menu to the frame
        self.SetMenuBar(menuBar)  
        
        # Display the frame
        self.Show()

# Create instance of wxPython application 
Example #10
Source File: LanguageEditor.py    From EventGhost with GNU General Public License v2.0 5 votes vote down vote up
def CreateMenuBar(self):
        # menu creation
        menuBar = wx.MenuBar()

        def AddMenuItem(name, func, itemId):
            menu.Append(itemId, name)
            self.Bind(wx.EVT_MENU, func, id=itemId)

        # file menu
        menu = wx.Menu()
        menuBar.Append(menu, "&File")
        AddMenuItem("&Open...\tCtrl+O", self.OnCmdOpen, wx.ID_OPEN)
        AddMenuItem("&Save\tCtrl+S", self.OnCmdSave, wx.ID_SAVE)
        menu.AppendSeparator()
        AddMenuItem("E&xit\tAlt+F4", self.OnCmdExit, wx.ID_EXIT)

        # edit menu
        menu = wx.Menu()
        menuBar.Append(menu, "&Edit")
        AddMenuItem("&Undo\tCtrl+Z", self.OnCmdUndo, wx.ID_UNDO)
        AddMenuItem("&Redo\tCtrl+Y", self.OnCmdRedo, wx.ID_REDO)
        menu.AppendSeparator()
        AddMenuItem("Cu&t\tCtrl+X", self.OnCmdCut, wx.ID_CUT)
        AddMenuItem("&Copy\tCtrl+C", self.OnCmdCopy, wx.ID_COPY)
        AddMenuItem("&Paste\tCtrl+V", self.OnCmdPaste, wx.ID_PASTE)
        AddMenuItem("&Delete", self.OnCmdDelete, wx.ID_DELETE)
        menu.AppendSeparator()
        AddMenuItem(
            "Find &Next Untranslated\tF3", self.OnCmdFindNext, wx.ID_FIND
        )

        # help menu
        menu = wx.Menu()
        menuBar.Append(menu, "&Help")
        AddMenuItem("About Language Editor...", self.OnCmdAbout, wx.ID_ABOUT)

        self.SetMenuBar(menuBar)
        return menuBar 
Example #11
Source File: networkedit.py    From CANFestivino with GNU Lesser General Public License v2.1 5 votes vote down vote up
def _init_coll_HelpMenu_Items(self, parent):
        parent.Append(help='', id=wx.ID_HELP,
              kind=wx.ITEM_NORMAL, text=_('DS-301 Standard\tF1'))
        self.Bind(wx.EVT_MENU, self.OnHelpDS301Menu, id=wx.ID_HELP)
        parent.Append(help='', id=wx.ID_HELP_CONTEXT,
              kind=wx.ITEM_NORMAL, text=_('CAN Festival Docs\tF2'))
        self.Bind(wx.EVT_MENU, self.OnHelpCANFestivalMenu, id=wx.ID_HELP_CONTEXT)
        if Html_Window and self.ModeSolo:
            parent.Append(help='', id=wx.ID_ABOUT,
                  kind=wx.ITEM_NORMAL, text=_('About'))
            self.Bind(wx.EVT_MENU, self.OnAboutMenu, id=wx.ID_ABOUT) 
Example #12
Source File: objdictedit.py    From CANFestivino with GNU Lesser General Public License v2.1 5 votes vote down vote up
def _init_coll_HelpMenu_Items(self, parent):
        parent.Append(help='', id=wx.ID_HELP,
              kind=wx.ITEM_NORMAL, text=_('DS-301 Standard\tF1'))
        self.Bind(wx.EVT_MENU, self.OnHelpDS301Menu, id=wx.ID_HELP)
        parent.Append(help='', id=wx.ID_HELP_CONTEXT,
              kind=wx.ITEM_NORMAL, text=_('CAN Festival Docs\tF2'))
        self.Bind(wx.EVT_MENU, self.OnHelpCANFestivalMenu, id=wx.ID_HELP_CONTEXT)
        if Html_Window and self.ModeSolo:
            parent.Append(help='', id=wx.ID_ABOUT,
                  kind=wx.ITEM_NORMAL, text=_('About'))
            self.Bind(wx.EVT_MENU, self.OnAboutMenu, id=wx.ID_ABOUT) 
Example #13
Source File: GUI_wxPython.py    From Python-GUI-Programming-Cookbook-Third-Edition with MIT License 5 votes vote down vote up
def createMenu(self):      
        menu= wx.Menu()
        menu.Append(wx.ID_NEW, "New", "Create something new")
        menu.AppendSeparator()
        _exit = menu.Append(wx.ID_EXIT, "Exit", "Exit the GUI")
        self.Bind(wx.EVT_MENU, self.exitGUI, _exit)
        menuBar = wx.MenuBar()
        menuBar.Append(menu, "File")   
        menu1= wx.Menu()    
        menu1.Append(wx.ID_ABOUT, "About", "wxPython GUI")
        menuBar.Append(menu1, "Help")     
        self.SetMenuBar(menuBar)  
    #---------------------------------------------------------- 
Example #14
Source File: Control_Frameworks_NOT_working.py    From Python-GUI-Programming-Cookbook-Third-Edition with MIT License 5 votes vote down vote up
def wxPythonApp():
    import wx
    app = wx.App()
    frame = wx.Frame(None, -1, "wxPython GUI", size=(200,150))
    frame.SetBackgroundColour('white')
    frame.CreateStatusBar()
    menu= wx.Menu()
    menu.Append(wx.ID_ABOUT, "About", "wxPython GUI")
    menuBar = wx.MenuBar()
    menuBar.Append(menu,"File") 
    frame.SetMenuBar(menuBar)     
    frame.Show()
    app.MainLoop() 
Example #15
Source File: Embed_wxPython.py    From Python-GUI-Programming-Cookbook-Third-Edition with MIT License 5 votes vote down vote up
def wxPythonApp():
    import wx
    app = wx.App()
    frame = wx.Frame(None, -1, "wxPython GUI", size=(200,150))
    frame.SetBackgroundColour('white')
    frame.CreateStatusBar()
    menu= wx.Menu()
    menu.Append(wx.ID_ABOUT, "About", "wxPython GUI")
    menuBar = wx.MenuBar()
    menuBar.Append(menu, "File") 
    frame.SetMenuBar(menuBar)     
    frame.Show()
    app.MainLoop() 
Example #16
Source File: GUI_wxPython.py    From Python-GUI-Programming-Cookbook-Second-Edition with MIT License 5 votes vote down vote up
def createMenu(self):      
        menu= wx.Menu()
        menu.Append(wx.ID_NEW, "New", "Create something new")
        menu.AppendSeparator()
        _exit = menu.Append(wx.ID_EXIT, "Exit", "Exit the GUI")
        self.Bind(wx.EVT_MENU, self.exitGUI, _exit)
        menuBar = wx.MenuBar()
        menuBar.Append(menu, "File")   
        menu1= wx.Menu()    
        menu1.Append(wx.ID_ABOUT, "About", "wxPython GUI")
        menuBar.Append(menu1, "Help")     
        self.SetMenuBar(menuBar)  
    #---------------------------------------------------------- 
Example #17
Source File: wxPython_frame_GUI.py    From Python-GUI-Programming-Cookbook-Second-Edition with MIT License 5 votes vote down vote up
def __init__(self, parent, title, size=(200,100)):
        # Initialize super class
        wx.Frame.__init__(self, parent, title=title, size=size)
        
        # Change the frame color 
        self.SetBackgroundColour('white')
        
        # Create Status Bar
        self.CreateStatusBar() 

        # Create the Menu
        menu= wx.Menu()

        # Add Menu Items to the Menu
        menu.Append(wx.ID_ABOUT, "About", "wxPython GUI")
        menu.AppendSeparator()
        menu.Append(wx.ID_EXIT,"Exit"," Exit the GUI")

        # Create the MenuBar
        menuBar = wx.MenuBar()
        # Give the Menu a Title
        menuBar.Append(menu,"File") 
        
        # Connect the Menu to the frame
        self.SetMenuBar(menuBar)  
        
        # Display the frame
        self.Show()

# Create instance of wxPython application 
Example #18
Source File: Control_Frameworks_NOT_working.py    From Python-GUI-Programming-Cookbook-Second-Edition with MIT License 5 votes vote down vote up
def wxPythonApp():
    import wx
    app = wx.App()
    frame = wx.Frame(None, -1, "wxPython GUI", size=(200,150))
    frame.SetBackgroundColour('white')
    frame.CreateStatusBar()
    menu= wx.Menu()
    menu.Append(wx.ID_ABOUT, "About", "wxPython GUI")
    menuBar = wx.MenuBar()
    menuBar.Append(menu,"File") 
    frame.SetMenuBar(menuBar)     
    frame.Show()
    app.MainLoop() 
Example #19
Source File: Embed_wxPython.py    From Python-GUI-Programming-Cookbook-Second-Edition with MIT License 5 votes vote down vote up
def wxPythonApp():
    import wx
    app = wx.App()
    frame = wx.Frame(None, -1, "wxPython GUI", size=(200,150))
    frame.SetBackgroundColour('white')
    frame.CreateStatusBar()
    menu= wx.Menu()
    menu.Append(wx.ID_ABOUT, "About", "wxPython GUI")
    menuBar = wx.MenuBar()
    menuBar.Append(menu, "File") 
    frame.SetMenuBar(menuBar)     
    frame.Show()
    app.MainLoop() 
Example #20
Source File: AboutDialog.py    From OpenPLC_Editor with GNU General Public License v3.0 4 votes vote down vote up
def __init__(self, parent, info):
        title = _("About") + " " + info.Name
        wx.Dialog.__init__(self, parent, title=title)
        self.info = info

        if parent and parent.GetIcon():
            self.SetIcon(parent.GetIcon())

        image = None
        if self.info.Icon:
            bitmap = wx.BitmapFromIcon(self.info.Icon)
            image = wx.StaticBitmap(self, bitmap=bitmap)

        name = wx.StaticText(self, label="%s %s" % (info.Name, info.Version))
        description = wx.StaticText(self, label=info.Description)
        description.Wrap(400)
        copyright = wx.StaticText(self, label=info.Copyright)
        url = HyperLinkCtrl(self, label=info.WebSite[0], URL=info.WebSite[1])

        font = name.GetClassDefaultAttributes().font
        font.SetWeight(wx.FONTWEIGHT_BOLD)
        font.SetPointSize(18)
        name.SetFont(font)

        credits = wx.Button(self, id=wx.ID_ABOUT, label=_("C&redits"))
        license = wx.Button(self, label=_("&License"))
        close = wx.Button(self, id=wx.ID_CANCEL, label=_("&Close"))

        btnSizer = wx.BoxSizer(wx.HORIZONTAL)
        btnSizer.Add(credits, flag=wx.CENTER | wx.LEFT | wx.RIGHT, border=5)
        btnSizer.Add(license, flag=wx.CENTER | wx.RIGHT, border=5)
        btnSizer.Add(close, flag=wx.CENTER | wx.RIGHT, border=5)

        sizer = wx.BoxSizer(wx.VERTICAL)
        if image:
            sizer.Add(image, flag=wx.CENTER | wx.TOP | wx.BOTTOM, border=5)
        sizer.Add(name, flag=wx.CENTER | wx.BOTTOM, border=10)
        sizer.Add(description, flag=wx.CENTER | wx.BOTTOM, border=10)
        sizer.Add(copyright, flag=wx.CENTER | wx.BOTTOM, border=10)
        sizer.Add(url, flag=wx.CENTER | wx.BOTTOM, border=15)
        sizer.Add(btnSizer, flag=wx.CENTER | wx.BOTTOM, border=5)

        container = wx.BoxSizer(wx.VERTICAL)
        container.Add(sizer, flag=wx.ALL, border=10)
        self.SetSizer(container)
        self.Layout()
        self.Fit()
        self.Centre()
        self.Show(True)
        self.SetEscapeId(close.GetId())

        credits.Bind(wx.EVT_BUTTON, self.on_credits)
        license.Bind(wx.EVT_BUTTON, self.on_license)
        close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy())