When I work on Python GUI project columnspan is limited with 5 when I try to make it bigger than 5 nothing is changed why ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

When I work on Python GUI project columnspan is limited with 5 when I try to make it bigger than 5 nothing is changed why ?

Python GUI projects

28th Jan 2020, 1:18 PM
Melik KOÇYİĞİT
Melik KOÇYİĞİT - avatar
7 Answers
+ 5
Melik KOÇYİĞİT I still don't know where the mistake is. I am not very familiar with Tk, so I would only know the answer after looking at the code itself. Open sololearn.com on your computer: 1. Connect to your account 2. Save the code 3. Share it here
28th Jan 2020, 1:25 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 4
We need more info: 1. What GUI framework arr you using ? 2. What are you trying to do ? 3. Where is your code ?
28th Jan 2020, 1:19 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 3
Are you using Tk framework?
28th Jan 2020, 1:21 PM
Sarthak
Sarthak - avatar
+ 2
Aymane Boukrouh Thank you 😊 I will add it when I arrive home thanks again for your attention
28th Jan 2020, 1:27 PM
Melik KOÇYİĞİT
Melik KOÇYİĞİT - avatar
+ 2
I think columnspan spans across columns+1 that are occupied by other widgets on the top of the widget you are spanning across otherwise tkinter does not allow you to span further.But it could have been helpful if you provided your code. consider this: spanning the button across more than 2 columns has no effect or when you move the button to column 3 it stays at column 2 from tkinter import * root = Tk() root.geometry('300x300') l1 = Label(root,bg='pink') l1.grid(row=0,column=0,padx=10) l2 = Label(root,bg='pink') l2.grid(row=0,column=1,padx=10) l3 = Label(root,bg='pink') l3.grid(row=1,column=0,padx=10) l4 = Label(root,bg='pink') l4.grid(row=1,column=1,padx=10) l5 = Label(root,bg='pink') l5.grid(row=2,column=0,padx=10) l6 = Label(root,bg='pink') l6.grid(row=2,column=1,padx=10) b1 = Button(root,text='Click me') b1.grid(row=3,column=0,columnspan=2) root.mainloop() Hope I helped.
29th Jan 2020, 8:24 AM
John
John - avatar
+ 1
Aymane Boukrouh I was using Tk framework and making a simple calculator Sorry My code is on my computer Now I m on the road just would like to ask is it a common problem or not
28th Jan 2020, 1:23 PM
Melik KOÇYİĞİT
Melik KOÇYİĞİT - avatar
28th Jan 2020, 1:23 PM
Melik KOÇYİĞİT
Melik KOÇYİĞİT - avatar