Python Forum
what does self.classname() do and how is it done?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what does self.classname() do and how is it done?
#7
The method is created here
import wx
 
class HelloFrame(wx.Frame):
    """
    A Frame that says Hello World
    """
    ...
    ...
    def makeMenuBar(self):
        """
        A menu bar is composed of menus, which are composed of menu items.
        This method builds a set of menus and binds handlers to be called
        when the menu item is selected.
        """
    ...
    ...
and called here
import wx
 
class HelloFrame(wx.Frame):
    """
    A Frame that says Hello World
    """
 
    def __init__(self, *args, **kw):
        # ensure the parent's __init__ is called
        super(HelloFrame, self).__init__(*args, **kw)
        ...
        ...
        # create a menu bar
        self.makeMenuBar()
Reply


Messages In This Thread
RE: what does self.classname() do and how is it done? - by Yoriz - Oct-23-2019, 05:22 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020