Re: horizontal line in Text

Aivar Annamaa <[email protected]> Thu, 16 Jan 2020 21:27:21 +0200
Newsgroups gmane.comp.python.tkinter
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============7744540843210205499==
Content-Type: multipart/alternative;
 boundary="------------82D65CB2CB2A547E90A6B612"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------82D65CB2CB2A547E90A6B612
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit

You can try using bgstipple attribute of a tag 
(https://www.tcl.tk/man/tcl8.6/TkCmd/text.htm#M45):

    text.tag_configure(tag_name,
    bgstipple="@path/to/a/bitmap/containing/a/line.xbm")

but unfortunately it doesn't work on macOS 
(https://wiki.tcl-lang.org/page/Tk+differences+on+Mac+OS+X)

Best regards,
Aivar


On 16.01.2020 15:14, Vasilis Vlachoudis wrote:
> Hi all,
>
> is it possible to draw a horizontal line in the Text() widget, something
> like the <hr> in html, extending all over the widget.
>
> Vasilis
>
> _______________________________________________
> Tkinter-discuss mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/tkinter-discuss

--------------82D65CB2CB2A547E90A6B612
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: 7bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>You can try using bgstipple attribute of a tag (<a
        href="https://www.tcl.tk/man/tcl8.6/TkCmd/text.htm#M45">https://www.tcl.tk/man/tcl8.6/TkCmd/text.htm#M45</a>):</p>
    <blockquote>
      <p><tt>text.tag_configure(tag_name,
          bgstipple="@path/to/a/bitmap/containing/a/line.xbm")</tt></p>
    </blockquote>
    <p>but unfortunately it doesn't work on macOS (<a
        href="https://wiki.tcl-lang.org/page/Tk+differences+on+Mac+OS+X">https://wiki.tcl-lang.org/page/Tk+differences+on+Mac+OS+X</a>)</p>
    <p>Best regards,<br>
      Aivar</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 16.01.2020 15:14, Vasilis Vlachoudis
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" id="owaParaStyle"></style>
      <div style="direction: ltr;font-family: Tahoma;color:
        #000000;font-size: 10pt;">
        <div style="font-family: Times New Roman; color: #000000;
          font-size: 16px">
          <div>
            <div dir="ltr">
              <div>Hi all,</div>
              <div><br>
              </div>
              <div>is it possible to draw a horizontal line in the
                Text() widget, something</div>
              <div>like the &lt;hr&gt; in html, extending all over the
                widget.</div>
              <div><br>
              </div>
              <div>Vasilis</div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Tkinter-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="https://mail.python.org/mailman/listinfo/tkinter-discuss">https://mail.python.org/mailman/listinfo/tkinter-discuss</a>
</pre>
    </blockquote>
  </body>
</html>

--------------82D65CB2CB2A547E90A6B612--

--===============7744540843210205499==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tkinter-discuss mailing list
[email protected]
https://mail.python.org/mailman/listinfo/tkinter-discuss

--===============7744540843210205499==--