Re: Listbox size
Bryan Oakley <[email protected]> Tue, 13 Feb 2018 17:09:30 -0600
| Newsgroups | gmane.comp.python.tkinter |
|---|---|
| Message-ID | <CAKypQny1KWmCn0V9k28FzEp+2aokp2AZXMN8Nk6sUgtHwOhAZQ@mail.gmail.com> |
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 <[email protected]> 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: [email protected] > WWW: http://www.mellowood.ca > > _______________________________________________ > Tkinter-discuss mailing list > [email protected] > https://mail.python.org/mailman/listinfo/tkinter-discuss > > _______________________________________________ Tkinter-discuss mailing list [email protected] https://mail.python.org/mailman/listinfo/tkinter-discuss