Re: Tablelist visible rows



Am 13.06.2011 10:41, schrieb Julian H J Loaring:
Does anyone know how to determine the number of visible rows currently
displayed in a Tablelist (or listbox for that matter) ? The -height
option sets the desired height in lines (rows) but does not reflect
the actual number lines on show.

kind regards
Julian H J Loaring

Same method for tablelist and listbox widgets:

set topRow [$tbl index @0,0]
set btmRow [$tbl index @0,[winfo height $tbl]]
set visibleCount [expr $btmRow - $topRow + 1]

--
Csaba Nemethi http://www.nemethi.de mailto:csaba.nemethi@xxxxxxxxxxx

.