Tkinter Base Window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Moscatt

    Tkinter Base Window

    Ok.... I am pretty new to Python (as you may have gathered from previous
    posts). So now it time for another one of my ridiculous questions.... :-)

    When using 'Tkinter', what is used as the base window to work from, meaning
    what widget do I use to place all other widgets onto to create a custom
    dialog ?

    Pete

  • Cameron Laird

    #2
    Re: Tkinter Base Window

    In article <401257c4$0$261 16$afc38c87@new s.optusnet.com. au>,
    Peter Moscatt <pgmoscatt@optu shome.com.au> wrote:[color=blue]
    >Ok.... I am pretty new to Python (as you may have gathered from previous
    >posts). So now it time for another one of my ridiculous questions.... :-)
    >
    >When using 'Tkinter', what is used as the base window to work from, meaning
    >what widget do I use to place all other widgets onto to create a custom
    >dialog ?[/color]

    Comment

    • Salvatore

      #3
      Re: Tkinter Base Window

      Peter Moscatt wrote:[color=blue]
      > Ok.... I am pretty new to Python (as you may have gathered from previous
      > posts). So now it time for another one of my ridiculous questions.... :-)
      >
      > When using 'Tkinter', what is used as the base window to work from, meaning
      > what widget do I use to place all other widgets onto to create a custom
      > dialog ?
      >
      > Pete
      >[/color]
      Here you can find what you search and more ;-)
      An Introduction to Tkinter: Explore the essential Python library for GUI design. This guide covers widgets, event handling, and geometry management to help you build functional, cross-platform desktop apps.


      Regards

      Salvatore

      Comment

      • smarter_than_you

        #4
        Re: Tkinter Base Window

        Peter Moscatt <pgmoscatt@optu shome.com.au> wrote in message news:<401257c4$ 0$26116$afc38c8 7@news.optusnet .com.au>...[color=blue]
        > Ok.... I am pretty new to Python (as you may have gathered from previous
        > posts). So now it time for another one of my ridiculous questions.... :-)
        >
        > When using 'Tkinter', what is used as the base window to work from, meaning
        > what widget do I use to place all other widgets onto to create a custom
        > dialog ?
        >
        > Pete[/color]

        see http://www.pythonware.com/library/tk...lo-tkinter.htm

        then click 'details' to see the explanation of root=Tk(), which
        creates the root window in your native OS.

        Note that you can create multiple root windows if you need them, and
        have them appear at specific locations on the screen using the
        ..geometry method (this is dangerous though unless know what your
        user's screen setup is)

        -dbm

        Comment

        • Russell E. Owen

          #5
          Re: Tkinter Base Window

          In article <401257c4$0$261 16$afc38c87@new s.optusnet.com. au>,
          Peter Moscatt <pgmoscatt@optu shome.com.au> wrote:
          [color=blue]
          >Ok.... I am pretty new to Python (as you may have gathered from previous
          >posts). So now it time for another one of my ridiculous questions.... :-)
          >
          >When using 'Tkinter', what is used as the base window to work from, meaning
          >what widget do I use to place all other widgets onto to create a custom
          >dialog ?[/color]

          You'll want to create a new Toplevel (the term Tkinter uses for the
          thing many of us think of as a window). If you want the window to be
          modal you'll have to do a few extra things.

          Tkinter already includes a lot of modules for creating dialogs. Find the
          file Tkinter.py (in lib-tk in with your other python libraries) and look
          at some of its fellows such as tkFileDialog.py , tkSimpleDialog. py and a
          host of others with dialog in their names. Read the source code to see
          how to use it (or import each package and type help(package_na me)). You
          may find exactly what you want, and if not, at least you'll see some
          examples.

          -- Russell

          Comment

          • Peter Moscatt

            #6
            Re: Tkinter Base Window

            Thanks Salvatore for the link.

            Pete


            Salvatore wrote:
            [color=blue]
            > Peter Moscatt wrote:[color=green]
            >> Ok.... I am pretty new to Python (as you may have gathered from previous
            >> posts). So now it time for another one of my ridiculous questions....
            >> :-)
            >>
            >> When using 'Tkinter', what is used as the base window to work from,
            >> meaning what widget do I use to place all other widgets onto to create a
            >> custom dialog ?
            >>
            >> Pete
            >>[/color]
            > Here you can find what you search and more ;-)
            > http://www.pythonware.com/library/tkinter/introduction/
            >
            > Regards
            >
            > Salvatore[/color]

            Comment

            Working...