PyGUI: 'gtk.Button' object has no attribute 'get_sensitive'

Discussion in 'Python' started by Lee Harr, Sep 26, 2004.

  1. Lee Harr

    Lee Harr Guest

    I wanted to modify the program Tests/04-button.py like so:

    def simulate_hello():
    btn1.activate()

    becomes...

    def simulate_hello():
    if btn2.enabled:
    btn2.activate()
    else:
    btn1.activate()


    but when I click on btn3 I get this:

    [...]
    File "04a-button.py", line 12, in simulate_hello
    if btn2.enabled:
    File "/usr/local/lib/python2.3/site-packages/GUI/Generic/Properties.py", line 30, in <lambda>
    lambda self: getattr(self, getter_name)(),
    File "/usr/local/lib/python2.3/site-packages/GUI/Gtk/Controls.py", line 34, in get_enabled
    return self._gtk_outer_widget.get_sensitive()
    AttributeError: 'gtk.Button' object has no attribute 'get_sensitive'


    I also tried btn2.get_enabled() but that gives the same error.

    Any hints on how to find out if the button is enabled?
     
    Lee Harr, Sep 26, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marc Christiansen

    Fontproblems with PyGUI and gtk 2.4.10

    Marc Christiansen, Sep 21, 2004, in forum: Python
    Replies:
    0
    Views:
    267
    Marc Christiansen
    Sep 21, 2004
  2. johnny
    Replies:
    5
    Views:
    755
    johnny
    Dec 10, 2006
  3. Replies:
    2
    Views:
    547
  4. Gergely Kontra
    Replies:
    2
    Views:
    274
    Joao Pedrosa
    Jun 18, 2004
  5. Alex Shulgin
    Replies:
    1
    Views:
    197
    thefed
    Nov 21, 2007
Loading...

Share This Page