method to add entries in multi columns entry frames in self widget - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: method to add entries in multi columns entry frames in self widget (/thread-32532.html) |
method to add entries in multi columns entry frames in self widget - sudeshna24 - Feb-16-2021 Hi, I am creating multi columns entry frames for a software. I had written code given below def Batch(self): self.top1=Toplevel() self.top1.geometry( '600x400+0+0') self.top1.resizable(0,0) self.top1.title( 'New Batch') self.bottomframe=ttk.Frame(self.top1,relief=RAISED,borderwidth=2) self.bottomframe.pack(side='bottom',fill=X) self.btn_Cancle = ttk.Button( self.bottomframe, height=1, width=6, text='Cancel', font=('rockwell',12,'bold'),bg='gray',fg='white',command=self.top1.destroy) self.btn_Cancle.pack(side=RIGHT,padx=5,pady=5) self.btn_Done = ttk.Button(self.bottomframe, height=1, width=5, text='Done', font=('rockwell',12,'bold'),bg='gray',fg='white' ) self.btn_Done.pack( side=RIGHT ) self.topframe=ttk.Frame(self.top1,relief=RAISED,borderwidth=2,bg='gray') self.topframe.pack(side='top',fill=BOTH,expand=True) self.NameEntry=ttk.Entry(self.topframe) self.NameEntry.grid(row=0,column=1) self.NameEntry.pack()I have to create 2 columns frames having entries. How I give label to NameEntry? How I create sub frames and its entries in 2 columns? RE: method to add entries in multi columns entry frames in self widget - menator01 - Feb-16-2021 Have a look at this tutorial. Maybe it will help. RE: method to add entries in multi columns entry frames in self widget - BashBedlam - Feb-19-2021 It's difficult to say without enough of the class to be able to run and test it but I can tell you for sure the you will need to reference the main or root window when declaring a Toplevel. Something like : self.top1=Toplevel(root_window) |