tkinter resizable text with grid

Paulo da Silva p_s_d_a_s_i_l_v_a_ns at netcabo.pt
Thu Dec 6 21:00:48 EST 2018


Às 21:15 de 06/12/18, Rick Johnson escreveu:
> Paulo da Silva wrote:
> 
...

> 
> In Tkinter, if you have a "container"[1] that only has a
> single widget stuffed inside, and, you want that single
> widget to expand to fill the extents of its parent
> container, then, the pack geometry manager is the simplest
> approach.
> 
>     w = create_a_widget()
>     w.pack(fill=X|Y|BOTH, expand=YES)
Yes, I am aware of pack. Unfortunately the code fragment I posted is a
very small part of a larger widget.

...

>     
> I kinda have a love/hate relationship with Tkinter and IDLE.
> On one hand i find them to be practical[2] and simple[3] and
> on the other, i find them to be poorly designed and
> unintuitive. And it's a real shame, because, both of these
> libraries have tons of potential, *IF*, they were designed
> probably and the shortcomings of TclTk were abstracted away
> behind a more Pythonic interface.
> 

I fully agree. Nevertheless, what I miss more is the lack of more
complex mega widgets - scrollable list of widgets with insert, append
and remove methods and perhaps a spreadsheet like widget are two big
ones. There are others smaller, like a single scrollable text with two
scroll bars that hide when not needed, tab multi-choice container, etc ...

Unfortunately I rarely need gui programming and don't have the expertise
to address such task. Being tk so old, I wonder why no one developed
those expansions - continuing tix, for example. There are some
implementations but they seem not being maintained.

Pmw has some of the later, but it is not much stable for python3.

Thanks for responding
Paulo


More information about the Python-list mailing list