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

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

  1. Ben Bush 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").

    </F>
     
    Fredrik Lundh, Nov 20, 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:
    481
    Fredrik Lundh
    Nov 21, 2005
  2. Rigour
    Replies:
    4
    Views:
    1,422
    Neredbojias
    Nov 17, 2009
  3. Cathy James
    Replies:
    2
    Views:
    139
  4. Joel Goldstick
    Replies:
    0
    Views:
    99
    Joel Goldstick
    Mar 19, 2013
  5. Dave Angel
    Replies:
    0
    Views:
    102
    Dave Angel
    Mar 19, 2013
Loading...

Share This Page