Tkinter label height to fit content

rantingrick rantingrick at
Wed Sep 7 00:40:08 CEST 2011

On Sep 6, 5:00 pm, Bart Kastermans <bkast... at> wrote:
> rantingrick <rantingr... at> writes:
> > Hmm, i can replace all that code with this...
> Because I stupidly forgot to repeat the original problem I had, and my
> code doesn't show it (and doesn't show the correct use of the function I
> wrote).

Oh NOW i see! This new code you posted is like night and day compared
to the original </sarcasm> :o)

Anyway, i did not read the code to find the difference because i want
to know why you insist on using multiple labels for this when a
scrolled text will suffice. Are you trying to create some sort of
textual "animation frames" that you can flip through on demand? If not
i would use the scrolled text (and even the scrolled text can "feel"
like animation frames whist scrolling).

Take your input data and replace ALL single newlines with null strings
(thereby preserving paragraphs) and let the textbox control the line
wrapping. The benefits are enormous using my way; your way is limited
and requires re-inventing the wheel. Tell me WHY the textbox approach
is not a viable solution and THEN i'll listen to you.

Until then; you can lead a horse to water...

More information about the Python-list mailing list