Python Forum
method to add entries in multi columns entry frames in self widget
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
method to add entries in multi columns entry frames in self widget
#1
Hi, Smile
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.
Arrow How I give label to NameEntry?
Arrow How I create sub frames and its entries in 2 columns?
Reply
#2
Have a look at this tutorial. Maybe it will help.
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags


Reply
#3
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)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  ValueError: could not convert string to float: '' fron Entry Widget russellm44 5 490 Mar-06-2024, 08:42 PM
Last Post: russellm44
  TKinter Widget Attribute and Method Quick Reference zunebuggy 3 786 Oct-15-2023, 05:49 PM
Last Post: zunebuggy
  [Tkinter] entry widget DPaul 5 1,433 Jul-28-2023, 02:31 PM
Last Post: deanhystad
  Tkinter Exit Code based on Entry Widget Nu2Python 6 2,872 Oct-21-2021, 03:01 PM
Last Post: Nu2Python
  Entry Widget issue PA3040 16 6,655 Jan-20-2021, 02:21 PM
Last Post: pitterbrayn
  [Tkinter] password with Entry widget TAREKYANGUI 9 5,774 Sep-24-2020, 05:27 PM
Last Post: TAREKYANGUI
  [Tkinter] Get the last entry in my text widget Pedroski55 3 6,295 Jul-13-2020, 10:34 PM
Last Post: Pedroski55
  How to retreive the grid location of an Entry widget kenwatts275 7 4,474 Apr-24-2020, 11:39 PM
Last Post: Larz60+
  POPUP on widget Entry taratata2020 4 3,673 Mar-10-2020, 05:04 PM
Last Post: taratata2020
  Transfer Toplevel window entry to root window entry with TKinter HBH 0 4,420 Jan-23-2020, 09:00 PM
Last Post: HBH

Forum Jump:

User Panel Messages

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