Draw oval using Python : Oval « 2D « 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 » 2D » OvalScreenshots 
Draw oval using Python
Draw oval using Python


from Tkinter import *

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

        iframe5 = Frame(frame, bd=2, relief=RAISED)
        iframe5.pack(expand=1, fill=X, pady=10, padx=5)
        c = Canvas(iframe5, bg='white', width=340, height=100)
        c.pack()
        for i in range(25):
            c.create_oval(5+(4*i),5+(3*i),(5*i)+60,(i)+60, fill='gray70')
        c.create_text(26080, text='Canvas', font=('verdana', 10'bold'))
        iframe5.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.Draw a Oval with fillDraw a Oval with fill
2.Draw ovalDraw oval
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.