[Tkinter-discuss] Listbox size
Michael Lange
klappnase at web.de
Tue Feb 13 18:38:02 EST 2018
Hi,
On Wed, 14 Feb 2018 03:19:29 +0530
Bhaskar Chaudhary <bha100710 at gmail.com> 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
More information about the Tkinter-discuss
mailing list