Hi, On Fri, 24 Jan 2020 16:44:30 +0000 Vasilis Vlachoudis <vasilis.vlachou...@cern.ch> wrote:
> Thanks > That's the easiest from all, and for my purpose it works just fine > > Vasilis > > > > ________________________________ > From: Bryan Oakley [bryan.oak...@gmail.com] > Sent: Friday, January 24, 2020 16:04 > To: Vasilis Vlachoudis > Subject: Re: [Tkinter-discuss] horizontal line in Text > > What I've done in the past is insert a single newline, and then apply a > tag that uses a one or two pixel tall font, and then a background color > or a border. When you add a tag on a newline, the background and border > is always drawn to the right margin and is adjusted as the window is > resized, yielding what looks like a line. > > def insert_hr(text, index): > text.tag_configure("hr", font=("Times", -2), background="red") > text.insert(index, "\n", "hr") > insert_hr(text, "2.0") thanks for sharing! You are right, this is much better than tinkering with embedded Frames. It never occured to me that this could be done so easily. Regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. A princess should not be afraid -- not with a brave knight to protect her. -- McCoy, "Shore Leave", stardate 3025.3 _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org https://mail.python.org/mailman/listinfo/tkinter-discuss