views:

290

answers:

1

On selecting value from 1 to 10 from gtk combox box it should populate the checkbox by taking combo box value as an input. Say for example if i select 5 then 5 checkbox will be generated. It works.. But the issue is after i selected 5 now im selecting next value as 3 from combo box then there 8 checkboxes are displayed. The old 5 checkbox didnt get replaced. Is there any way to refresh the vbox(which has the checkboxes) or update to a new value.

Enviroment : FC10 , Glade 2 , Python 2.5 , GTK.

+2  A: 

Add this to your code right before you add your comboboxes:

for widget in myVBox.get_children():
    myVBox.remove(widget)
DoR
Thanks Pynt.. It works... :) I have added right before adding my dynamic checkboxes ...
Webrsk