Using Tix and Tkinter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Harlin Seritt

    #1

    Using Tix and Tkinter

    I am trying to create a simple window using the following code:

    --code---

    import Tix
    from Tkconstants import *
    from Tkinter import *

    root = Tix.Tk()

    Label(root, text="Hello!"). pack()
    Tix.tixControl( ).pack()

    root.mainloop()

    ---code---

    When I run this, I get the following error:

    Traceback (most recent call last):
    File "TixTest.py ", line 8, in ?
    Tix.tixControl( ).pack()
    AttributeError: 'module' object has no attribute 'tixControl'

    Any reason why I am not able to pull up this widget to work with it?

    Thanks,

    Harlin Seritt


  • harold fellermann

    #2
    Re: Using Tix and Tkinter


    On 31.12.2004, at 16:50, Harlin Seritt wrote:[color=blue]
    > import Tix
    > from Tkconstants import *
    > from Tkinter import *
    >
    > root = Tix.Tk()
    >
    > Label(root, text="Hello!"). pack()
    > Tix.tixControl( ).pack()
    >
    > root.mainloop()[/color]
    [color=blue]
    > When I run this, I get the following error:
    >
    > Traceback (most recent call last):
    > File "TixTest.py ", line 8, in ?
    > Tix.tixControl( ).pack()
    > AttributeError: 'module' object has no attribute 'tixControl'[/color]

    in the Tix module this widget is called Control. writing
    Tix.Control().p ack()
    should work.

    - harold -

    --
    Man will occasionally stumble over the truth,
    but most of the time he will pick himself up and continue on.
    -- Winston Churchill

    Comment

    Working...