Entry (Text field) with a label inside a border panel : TextField Entry : GUI Tk PYTHON examples


PYTHON examples » GUI Tk » TextField Entry »

 

Entry (Text field) with a label inside a border panel


Entry (Text field) with a label inside a border panel
 
from Tkinter import *

class AllTkinterWidgets:
    def __init__(self, master):
        frame = Frame(master, width=500, height=400, bd=1)
        frame.pack()

        iframe2 = Frame(frame, bd=2, relief=RIDGE)
        Label(iframe2, text='Label:').pack(side=LEFT, padx=5)
        t = StringVar()
        Entry(iframe2, textvariable=t, bg='white').pack(side=RIGHT, padx=5)
        t.set('Entry widget')
        iframe2.pack(expand=1, fill=X, pady=10, padx=5)


    
root = Tk()
all = AllTkinterWidgets(root)
root.title('Tkinter Widgets')
root.mainloop()

           
         
  



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo GUI Tk
» TextField Entry