Re: Listbox size

Michael Lange <[email protected]> Wed, 14 Feb 2018 00:38:02 +0100
Newsgroups gmane.comp.python.tkinter
Message-ID <[email protected]>
Hi, 

On Wed, 14 Feb 2018 03:19:29 +0530
Bhaskar Chaudhary <[email protected]> wrote:

> 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.

correct, this should work. However, life can be made a tiny bit easier
with

print(listbox.size())

Best regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

War isn't a good life, but it's life.
		-- Kirk, "A Private Little War", stardate 4211.8