Python Forum
Use String contents for checkbox name
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use String contents for checkbox name
#1
Creating a number of checkbuttons with a for loop.
I store the name increment and would like to use the stored string as the checkbox name.
chkbox = "cb" + '%s' % i
self.chkbox  = Checkbutton(self.frame_content, text = aprlist[i-1])
         #   self.chkbox.grid(row = rowpos, column = col, padx = 5, pady = 2, sticky = 'w')
the question is, how to replace self.chkbox with the string content of chkbox

Any suggesstions?

Thanks
Reply


Messages In This Thread
Use String contents for checkbox name - by jcday - Dec-06-2019, 04:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Checkbox itens with a button to run action Woogmoog 3 987 Dec-19-2022, 11:54 AM
Last Post: Woogmoog
  Checkbox half working Milfredo 12 4,264 Sep-19-2020, 10:43 PM
Last Post: Milfredo
  How To Find an Opening and Closing String, Copying Open/Close/Contents to New File davidshq 1 2,062 Mar-03-2020, 04:47 AM
Last Post: davidshq

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020