Re: How to draw a dash line in the Tkinter?

Discussion in 'Python' started by Fredrik Lundh, Nov 21, 2005.

  1. "Shi Mu" wrote:

    > > > How to draw a dash line in the Tkinter?

    > >
    > > use the dash option. e.g.
    > >
    > > canvas.create_line(xy, fill="red", dash=(2, 4))
    > > canvas.create_line(xy, fill="red", dash=(6, 5, 2, 4))
    > >
    > > (the tuple contains a number of line lengths; lengths at odd positions
    > > are drawn, lengths at even positions are gaps. note that not all com-
    > > binations are supported on all platforms; if Tkinter cannot find an exact
    > > match, it will pick a the "closest possible").


    > where can I find the option settings for dash line?


    in the post you replied to?

    or here (same, but without examples):

    http://effbot.org/tkinterbook/canvas.htm#Tkinter.Canvas.create_line-method

    or here (using tcl syntax):

    http://www.tcl.tk/man/tcl8.4/TkLib/GetDash.htm

    </F>
     
    Fredrik Lundh, Nov 21, 2005
    #1
    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. Fredrik Lundh
    Replies:
    0
    Views:
    661
    Fredrik Lundh
    Nov 20, 2005
  2. Rigour
    Replies:
    4
    Views:
    1,462
    Neredbojias
    Nov 17, 2009
  3. Cathy James
    Replies:
    2
    Views:
    144
  4. Joel Goldstick
    Replies:
    0
    Views:
    106
    Joel Goldstick
    Mar 19, 2013
  5. Dave Angel
    Replies:
    0
    Views:
    112
    Dave Angel
    Mar 19, 2013
Loading...

Share This Page