473,395 Members | 1,335 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,395 software developers and data experts.

Toggle button in a ListStore in pygtk, i cant make it work!

This is my code:

def list(self):
tree = self.principal.get_widget("list")
self.list = gtk.ListStore(bool,str)
self.options = [1,"programa1"]

renderer1 = gtk.CellRendererToggle()
renderer1.set_property('activatable', True)
renderer1.connect( 'toggled', self.selection, self.list)
tree.insert_column_with_attributes(0, "Select",renderer1)

renderer2 = gtk.CellRendererText()
tree.insert_column_with_attributes(1,"Install",ren derer2, text=1)
self.list.append(self.options)
tree.set_model(self.list)

def selection( self, cell, path, model ):
model[path][0] = not model[path][0]
return

It shows up but the toggle button isnt working! what is wrong with
this?

I m following this example:

http://pygtk.org/pygtk2tutorial/sec-...vatableProgram

Thanx for any help!

Mar 13 '06 #1
0 1101

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

Similar topics

25
by: TPJ | last post by:
GUI's etc: PyGtk on Windows "(...) So if someone develops mainly for X and just wants to make sure that it is not impossible to run on Windows, you can use PyGTK. (...)", July 2nd, 1999 pyGTK...
11
by: MLH | last post by:
Why is that? If I choose the tiny check boxes which are hard to hit with a mouse, it works fine. But option buttions, shich can be sized big enough for people with limited sight and dexterity...
4
by: Neil Coleclough | last post by:
I am constructing a database to process product returns for my Company. I have a number of toggle buttons to identify the stage to which each return has been processed. For example, clicking the...
2
by: Mel | last post by:
Hi, is there any way I can implement toolstrip toggle button simular to the MS Word alignment button? if one toggle button already pressed down, if user click on the "pushed down button", the...
1
by: Mike | last post by:
Hi all, Hum i just erased the whole message by mistake, :( Ok so i want to hide a specific field in an Access form using a toggle button, but i cant seem to get the right syntax. Right now im...
1
by: Jeffrey Christiansen | last post by:
I wanted to add a toggle button to a VB2005 form to be used for a simple Windows Application (i.e. compiled to a "*.exe"), so I added the ActiveX Microsoft Forms Object toggle button, however I...
1
by: Guillermo Heizenreder | last post by:
Hi list I'm developing a application for learn pygkt, and I need to know when a user selected or clicked one determinate row of my TreeView for shot another signal . Study the tutorial I began...
0
by: mailbinoy | last post by:
hi, i am writing a app which has a treeview. i am using a liststore to update the tree tmplist= self.liststore.append(tmplist) i am also 'pickling' the list to a file. . the app has a option...
1
by: binaryjesus | last post by:
hi group i am running into a problem with gtk. i have a treeview that just displays tabular data (no down arrows or trees etc). it has 5 columns. The tiny problem i am having is that it is just...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.