Saturday, July 25, 2015

How extract from list with BooleanVar objects each object

I want from list (1) with BoolenVar objects (2) extract this objects in "from" loop (3)...How can I do it...

def createCheckButton(self):
    y
=3
    for x in range(self.lp):
       
self.chooseButton=BooleanVar() #(2)
       
Checkbutton(variable=self.chooseButton, command=self.splitOrder()).grid(row=x+1, column=y+1)
       
self.listCheckButton.append(self.chooseButton) #(1)

def splitOrder(self): #(3)
    count
=len(self.listCheckButton)
   
for x in range(count):
       
if self.chooseButton[x].get():
           
print(self.chooseButton)


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c5100bac-5fa3-472c-a103-b660cc845fc7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment