[Tkinter-discuss] Listbox size

Bhaskar Chaudhary bha100710 at gmail.com
Tue Feb 13 16:49:29 EST 2018


Hi Bob

Are you looking for the number of items in the listbox ?
If yes this should give you the number of items.

print(len(listbox.get(0, END)))

Given that each item occupies one line in the list box, i think it the
same as giving the height in lines.

regards
Bhaskar


On 2/13/18, 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
>


More information about the Tkinter-discuss mailing list