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

Getting/setting status of multiple checkbuttons made in loop

127 100+
Hi,

I have a routine that creates multiple checkbuttons. I'd like to add a separate combobox that, in part, changes the status of the checkbuttons made in this loop. Could someone point me to some code that allowd me to change, say the second checkbutton made in the loop from False to True?

Expand|Select|Wrap|Line Numbers
  1.         for imol in molecule_number_list():
  2.             button_name = molecule_name(imol)
  3.             button_imol = gtk.CheckButton(button_name)
  4.             #button_imol.set_active(False)
  5.             if imol == ref_mol:
  6.                 print "XXXX"
  7.                 button_imol.set_active(False)
  8.             else:
  9.                 button_imol.set_active(True)
  10.             combobox_imol = gtk.combo_box_new_text()
  11.             button_imol.connect("toggled", moving_mol, imol)
  12.             for chain in chain_ids(imol):
  13.                 combobox_imol.append_text(chain)
  14.             check_hbox_imol = gtk.HBox(True, 6)
  15.             check_hbox_imol.pack_start(button_imol, False, False)
  16.             check_hbox_imol.pack_start(combobox_imol, False, False)
  17.             box1_vbox.pack_start(check_hbox_imol, False, False)
  18.  
Oct 22 '12 #1
0 1234

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Mike C | last post by:
First of all, I am a complete newbie to Python, but have been impressed with how easy the language has been to pick up. I am trying to write a script that checks to see if the web / application...
2
by: Alex | last post by:
Hi all, I'm running into a road block, and I know I've done this before. I'm getting fields from two tables, and I need to do a count of similar items with it showing some extra info. Here's...
1
by: David | last post by:
Hi, I have a problem in getting the status of the modem. Here is my code: HANDLE hfile; DCB dcb; hfile = CreateFile("BCM V.92 56K Modem", GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); ...
0
by: Alvin A. Delagon | last post by:
I'm writing a simple python code that will upload files onto a ftp server. Everything's fine and working great except that the script I wrote don't know is an upload is successful or not. Is there...
4
by: pavan734 | last post by:
Hello I have one .h file which I have includeded completely under #ifndef followed by #define guards. I have the member function definitions in the same .h file only. Still Iam getting linker...
2
by: chalrav | last post by:
Hi, I have three tables as below: Table: Demand ITEM_ID, QUANTITY Item A, 10 Table: Route ITEM_ID, OPERATION_NO, RESOURCE, TIME
0
by: iamclippy | last post by:
Hello, Where I work, we are hosting several ASP.NET web applications on Windows Server 2003. Each application needs to have a different date format. What is the best way to implement this? ...
0
by: rich | last post by:
Hi all, I have a fairly complex "feed" application that recieves messages from an external user-supplied API via a callback function, and attempts to forward these messages to another...
8
by: chimambo | last post by:
Hi Everyone, I have a huge problem. I am trying to get two corresponding variables from a Checkbox and a Text box. e.g. If I check a value, say: enrolled? (checkbox) then I have to put the date...
3
by: Tina | last post by:
I know how to specify a separate IP in IIS but how to I specify it at the server2003 level? Although I added another web site in IIS with an (internal) IP of 192.168.22.23, it doesn't work. And...
1
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...
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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 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.