python - wait for button click on button click move button to a slot in tkinter -


i title wasn't best don't quite know how explain it. tkinter want make square widgets "slots on them. when app run want buttons show @ top of screen , 4x4 grid of square widgets. app wait user click on button. button should move top left slot on top left square. after done user should repeat process , next button should go next slot on top left square , on until square full, repeat process next square. should fixed position button allows me pass on slot without putting things in it? how should accomplish this? have loop need:

 elem in zip(*l):     in elem:         print(a) 

i'm not entirely sure if understand problem correctly, looks @ core, you're trying reposition tkinter widgets, correct?

you can geometry manager. if use grid method (which in case recommend) can do:

def changebuttonpostion():     button2.grid_remove() #gets rid of widget in top left corner     button.grid(row=0, column=1) #the top left corner of 4x4 grid 

otherwise, can use pack_forget method if use pack geometry manager.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -