# HG changeset patch # User Claus Gittinger # Date 822763933 -3600 # Node ID cddf10b2207e50741dcb720a83bc7148698cd7fa # Parent 4bbc8deffc8cb771506a5a7c2b2f9d3cf6bd037c added query for height with n lines diff -r 4bbc8deffc8c -r cddf10b2207e ListView.st --- a/ListView.st Sat Jan 27 18:30:14 1996 +0100 +++ b/ListView.st Sat Jan 27 18:32:13 1996 +0100 @@ -1554,6 +1554,16 @@ ^ firstLineShown ! +heightForLines:numberOfLines + "return the height of the receiver, if numberOfLines are to be displayed" + + "need a device font for query" + font := font on:device. + ^ numberOfLines * fontHeight + topMargin + font descent + (lineSpacing) + (margin * 2) + + "Created: 27.1.1996 / 16:55:39 / cg" +! + heightOfContents "return the height of the contents in pixels - used for scrollbar interface" @@ -2781,5 +2791,5 @@ !ListView class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.58 1996-01-27 11:51:29 cg Exp $' + ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.59 1996-01-27 17:32:13 cg Exp $' ! !