Help - GUI programming question

Tim Roberts timr at
Fri Sep 27 01:16:03 EDT 2002


>Quick question. The following yields the error: "makemenu takes only one
>argument (2 given)". This should be simple - I'm just not seeing it! Can
>anyone explain? The applicable code follows:

I know!  I know!  What's the prize?

>class WINMENU:
>  def makemenu(parent):

Your makemenu DOES only expect one argument.  You need to make room for the

   def makemenu(self,parent):

>    menubar = Frame(parent)                        # win=top-level window
>    menubar.pack(side=TOP, fill=x)                 # set its menu option
>	(more code to build a menu.....)
>if __name__ == '__main__':
>  root = Tk()
>  root.title('GUI Menu')
>  smenu = WINMENU()
>  smenu.makemenu(root)  
- Tim Roberts, timr at
  Providenza & Boekelheide, Inc.

More information about the Python-list mailing list