[Tkinter-discuss] Listbox size

Bryan Oakley bryan.oakley at gmail.com
Tue Feb 13 18:09:30 EST 2018


The actual height of any widget can be obtained with the winfo_height
method. It returns the value in pixels. To get the height in number of
lines you'll have to compute the height of your font and do a little math.



On Tue, Feb 13, 2018 at 12:11 PM, Bob van der Poel <bob at mellowood.ca> wrote:

> Is there a way to get the current height (hopefully in lines) of a
> listbox? I'd like to center, vertically, the result of a search.
>
> --
>
> **** Listen to my FREE CD at http://www.mellowood.ca/music/cedars ****
> Bob van der Poel ** Wynndel, British Columbia, CANADA **
> EMAIL: bob at mellowood.ca
> WWW:   http://www.mellowood.ca
>
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
> https://mail.python.org/mailman/listinfo/tkinter-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20180213/f332742f/attachment.html>


More information about the Tkinter-discuss mailing list