Tkinter and Graphics

Discussion in 'Python' started by Alex Martelli, Nov 14, 2004.

  1. Andrew <> wrote:

    > Hi I was wondering if there is anyway in Tkinter to create GUIs using
    > Graphics, like windows media player or other tools like that


    I guess you could do just about anything with Canvas, it that's what you
    mean.


    Alex
     
    Alex Martelli, Nov 14, 2004
    #1
    1. Advertising

  2. Alex Martelli

    John Hunter Guest

    >>>>> "Andrew" == Andrew <> writes:

    Andrew> Hi I was wondering if there is anyway in Tkinter to create
    Andrew> GUIs using Graphics, like windows media player or other
    Andrew> tools like that

    Andrew> basically so the interface wouldn't be your standard
    Andrew> interface

    Andrew> any ideas, links to tutorials, or examples

    Andrew> is appreciated

    This sounds like enthought's enable toolkit, which is still under
    development. Basically, they use the antigrain graphics library to
    develop their own GUI widgets, which can then be embedded in a tk
    graphic's canvas, at gtk drawing area, a wx panel, etc. Though enable
    doesn't support all of these GUIs currently, I believe, it can in
    principle.

    http://svn.enthought.com/svn/enthought

    I've often wished for something like this in developing matplotlib,
    because a lot of work goes into supporting multiple GUIs, and it would
    be nice to have a core set of widgets that port across GUIs. Another
    approach is anygui, which I've been meaning to look into...

    JDH
     
    John Hunter, Nov 14, 2004
    #2
    1. Advertising

  3. Alex Martelli

    Andrew Guest

    Hi I was wondering if there is anyway in Tkinter to create GUIs using
    Graphics, like windows media player or other tools like that

    basically so the interface wouldn't be your standard interface

    any ideas, links to tutorials, or examples

    is appreciated

    Cheers
     
    Andrew, Nov 15, 2004
    #3
  4. Alex Martelli

    jmdeschamps Guest

    (Alex Martelli) wrote in message news:<1gn98g2.1uhohpdpev85hN%>...
    > Andrew <> wrote:
    >
    > > Hi I was wondering if there is anyway in Tkinter to create GUIs using
    > > Graphics, like windows media player or other tools like that

    >
    > I guess you could do just about anything with Canvas, it that's what you
    > mean.
    >
    >
    > Alex


    Such as this (below)
    (I made this while reading as an refresher for myself, since I'm doing
    mostly CGI and web related stuff these days!)

    Good interface design!!!

    JM

    ################
    import Tkinter

    bar = 1
    cursing = True

    def foo(s):
    global bar
    print bar
    bar += 1

    def baz(s):
    global cursing,rCanvas
    if cursing :
    cursing = False
    rCanvas.config(cursor="pirate")
    else:
    cursing = True
    rCanvas.config(cursor="")

    root = Tkinter.Tk()
    rCanvas=Tkinter.Canvas(root, background="white")
    idPoly=rCanvas.create_polygon(10,10,10,200,150,250,50,100)
    rCanvas.tag_bind(idPoly,"<Button-1>",foo)
    rCanvas.tag_bind(idPoly,"<Enter>",baz)
    rCanvas.tag_bind(idPoly,"<Leave>",baz)
    rCanvas.pack()
    root.mainloop()
    ###############
     
    jmdeschamps, Nov 15, 2004
    #4
  5. Andrew <> wrote in message news:<>...
    > Hi I was wondering if there is anyway in Tkinter to create GUIs using
    > Graphics, like windows media player or other tools like that
    >
    > basically so the interface wouldn't be your standard interface
    >
    > any ideas, links to tutorials, or examples
    >
    > is appreciated
    >
    > Cheers

    Check out wxPython ShapedWindow in the DEMO
     
    Chad Crabtree, Nov 15, 2004
    #5
  6. Alex Martelli

    bsmith Guest

    On Sun, 14 Nov 2004 21:46:27 -0800, Andrew wrote:

    > Hi I was wondering if there is anyway in Tkinter to create GUIs using
    > Graphics, like windows media player or other tools like that
    >
    > basically so the interface wouldn't be your standard interface
    >
    > any ideas, links to tutorials, or examples
    >
    > is appreciated
    >
    > Cheers


    Highly recommended: _Python and Tkinter Programming_ by John E. Grayson,
    if you can find a copy. (It's out of stock on Manning's site and they
    don't offer it in Electronic form.)

    http://www.manning.com/grayson

    Section 8.7 ("Image Maps"), where the author describes building a GUI that
    looks like a TI-82, by using an image of same as the basis for the
    interface seems like it could be relevant.

    Chapter 9 ("Panels and Machines") also seems like it could be of help to
    you. It describes building a GUI modeled on the front panel of an actual
    device. It also contains a nice front-end for a digital multimeter with a
    rotating knob for setting the current range.

    Perhaps you can find a copy on amazon, ebay or a brick-and-mortar store
    with slow turn-over.

    // Ben
     
    bsmith, Nov 17, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Epler
    Replies:
    0
    Views:
    531
    Jeff Epler
    Aug 20, 2004
  2. Sean McIlroy

    drag and drop graphics in tkinter?

    Sean McIlroy, Nov 23, 2004, in forum: Python
    Replies:
    5
    Views:
    656
    Lonnie Princehouse
    Nov 23, 2004
  3. David Lees

    Tkinter on Silicon Graphics machine?

    David Lees, Dec 6, 2006, in forum: Python
    Replies:
    2
    Views:
    271
    David Lees
    Dec 7, 2006
  4. Hidekazu IWAKI
    Replies:
    1
    Views:
    417
    Peter Otten
    Dec 14, 2009
  5. Hidekazu IWAKI
    Replies:
    0
    Views:
    552
    Hidekazu IWAKI
    Dec 15, 2009
Loading...

Share This Page