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

.



Relevant Pages

  • Re: Tablelist visible rows
    ... schrieb Julian H J Loaring: ... option sets the desired height in lines but does not reflect ... The method shown above is not always correct, because it ignores the case that there are hidden rows between the top and button ones. ...
    (comp.lang.tcl)
  • Re: Tablelist 5.3.1 row deletion minor bug
    ... schrieb Julian H J Loaring: ... package require Ttk ... It only affects the tree style "aqua", because currently this is the only tree style whose expand/collapse control images in selected cells are different from those used in unselected ones. ...
    (comp.lang.tcl)