Sep-23-2021, 05:53 AM
Thanks Deanhystad and Menator01.
It was just an example to put out 5 buttons on each tabs. In the end, I do not know how many buttons I will have on each TABS. I have a button array that I loop out the buttons from and info from the array so I want to be able to control which TAB it should end up on.
Deanhystad, that's how I wanted it to work. Just added tabControl.add (frame, text = name) :)
When I could have the TABS in an array i probably had solved it with % instead. Have not tested, but something like this to avoid a lot of IF and ELIF.
It was just an example to put out 5 buttons on each tabs. In the end, I do not know how many buttons I will have on each TABS. I have a button array that I loop out the buttons from and info from the array so I want to be able to control which TAB it should end up on.
Deanhystad, that's how I wanted it to work. Just added tabControl.add (frame, text = name) :)
When I could have the TABS in an array i probably had solved it with % instead. Have not tested, but something like this to avoid a lot of IF and ELIF.
for i in range(1, 21): if (i % 5 == 0): t += 1 buttons[i] = Button(tabs[ t ], text = "Button " + i ).place(x=i*100, y=i*100)Thanks agin both. :)