Entry (Text field) with a label inside a border panel : TextField Entry « GUI Tk « Python

Home
Python
1.2D
2.Application
3.Buildin Function
4.Class
5.Data Structure
6.Data Type
7.Database
8.Development
9.Dictionary
10.Event
11.Exception
12.File
13.Function
14.GUI Pmw
15.GUI Tk
16.Language Basics
17.List
18.Math
19.Network
20.String
21.System
22.Thread
23.Tuple
24.Utility
25.XML
Python » GUI Tk » TextField EntryScreenshots 
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()

           
         
  
Related examples in the same category
1.Use EntryUse Entry
2.Entry: TextField: get entered valueEntry: TextField: get entered value
3.Entry: enter eventEntry: enter event
4.Use Entry widgets directly and layout by rowsUse Entry widgets directly and layout by rows
5.Entry Fields in a rowEntry Fields in a row
6.Get value from EntryGet value from Entry
7.Set textvariable for Entry
8.Bind enter key to Entry
9.implement a very simple calculator, just evaluating Python math
10.Attached variables
11.Entry Field in a model dialogEntry Field in a model dialog
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.