473,327 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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


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?

Jul 18 '05 #1
0 1210

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Vishal Jayaswal | last post by:
Hi, I m vishal jayaswal. I m doing my BE from Agra and i m working on PHP. At present i m creating an small application for adding two numbers. Enter forst number in one text box and second number...
108
by: Zooko O'Whielacronx | last post by:
I'm a fan of Greg Ewing's PyGUI . I used it to code a simple game for my son , and enjoyed it. Programming with wxPython feels like programming with a C++ tool that has been wrapped in Python....
0
by: Marc Christiansen | last post by:
Hi! After some installation problems related to PyGUI (well, indirectly -- I had to install new versions of: freetype, fontconfig, xft2 (from fcpackage.2_1.tar.gz, because the latest xft2 won't...
2
by: fabien | last post by:
Hi, I am writing a POV-RAY editor with Python using either QT or GTK as GUI 'wrapper'. ( I am still trying both ) * * * * PYGTK * * * * I have downloaded PygtkScintilla-1.99.5. There is a...
3
by: William Park | last post by:
I'm very excited to announce shell interface to GTK+2 (2.6.1) for Bash. It read XML syntax describing the widget layout, and returns user selection as shell variable or runs shell command as...
3
by: greg | last post by:
A small problem has come to light with PyGUI 1.6 on MacOSX systems. If you get the following exception: File "GUI/Generic/BaseAlertFunctions.py", line 5, in ? ImportError: No module named...
0
by: jnakam | last post by:
Hi, Im trying to get the gtk_editable_set_position to work. I have a gtkEntry text box and i first enter "12378978987913". When I press '4' I expect the cursor to move to the fourth position...
6
by: kdikert | last post by:
I have a worker thread, and when the worker is done I want it to show a popup dialog. The sample application below demonstrates this. There are two buttons: a "Show dialog" button which immediately...
37
by: Michael Palmer | last post by:
As anyone knows, the state of Python GUI programming is a little fractured at this time, with many toolkits, wrappers and meta-wrappers dead and alive, with or without documentation. I've come...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.