Hi,
I have 3 columns, the first is text, the second are checkbuttons, and the last are comboboxes. Could someone tell me how I can populate the comboboxes using only data added to the child list? Below is the code I have so far: -
treestore = gtk.TreeStore(str, bool)
-
for imol in molecule_number_list():
-
mol_name = molecule_name(imol)
-
piter = treestore.append(None, [mol_name, True])
-
for chain in chain_ids(imol):
-
treestore.append(piter, [chain, True])
-
-
treeview = gtk.TreeView(treestore)
-
column_text = gtk.TreeViewColumn("Text")
-
column_toggle = gtk.TreeViewColumn("Toggle")
-
column_combo = gtk.TreeViewColumn("Combo")
-
treeview.append_column(column_text)
-
treeview.append_column(column_toggle)
-
treeview.append_column(column_combo)
-
-
cellrenderer_text = gtk.CellRendererText()
-
column_text.pack_start(cellrenderer_text, False)
-
column_text.add_attribute(cellrenderer_text, "text", 0)
-
-
cellrenderer_toggle = gtk.CellRendererToggle()
-
column_toggle.pack_start(cellrenderer_toggle, True)
-
column_toggle.add_attribute(cellrenderer_toggle, "active", 1)
-
-
cellrenderer_combo = gtk.CellRendererCombo()
-
cellrenderer_combo.set_property("editable", True)
-
cellrenderer_combo.set_property("model", treestore)
-
cellrenderer_combo.set_property("text-column", 0)
-
column_combo.pack_start(cellrenderer_combo, False)
-
column_combo.add_attribute(cellrenderer_combo, "text", 2)
-
-
window.connect("destroy", lambda w: gtk.main_quit())
-
cellrenderer_toggle.connect("toggled", cell_toggled, treestore)
-
0 1429 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Kostatus |
last post by:
I have a virtual function in a base class, which is then overwritten by a
function of the same name in a publically derived class. When I call the
function using a pointer to the derived class...
|
by: Sudesh Sawant |
last post by:
Hello,
We have an application which communicates using remoting. There is a server
which is a Windows Service. The server exposes an object which is a
singleton. The client is a Web Application...
|
by: Peter Olcott |
last post by:
www.halting-problem.com
|
by: James Griffiths |
last post by:
Here is a report I've written about a printing problem that is being
experienced by a particular company for whom I had developed a A97 system.
After upgrading to Win XP and AXP, some printing...
|
by: Ian Stanley |
last post by:
Hi,
Continuing my strcat segmentation fault posting-
I have a problem which occurs when appending two sting literals using
strcat.
I have tried to fix it by writing my own function that does the...
|
by: Jon Davis |
last post by:
If I have a class with a virtual method, and a child class that overrides
the virtual method, and then I create an instance of the child class AS A
base class...
BaseClass bc = new ChildClass();...
|
by: Praveen K |
last post by:
I have a problem in communicating between the C# and the Excel Interop
objects. The problem is something as described below.
I use Microsoft Office-XP PIA dll’s as these dll’s were been...
|
by: Ammar |
last post by:
Dear All,
I'm facing a small problem.
I have a portal web site, that contains articles, for each article, the end
user can send a comment about the article.
The problem is:
I the comment length...
|
by: _v_tiziano |
last post by:
Hi folks!
I notice a strange (and orrible) behavior in gtk.CellRendererCombo.
My code work trapping the 'edited' signal to store in a temporary
buffer before the "save all" operation (by...
|
by: sebastien.abeille |
last post by:
Hello,
I would like to create a minimalist file browser using pyGTK.
Having read lot of tutorials, it seems to me that that in my case, the
best solution is
to have a gtk.TreeStore containing...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
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...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |