#FEATURE
authorClaus Gittinger <cg@exept.de>
Mon, 30 Nov 2015 17:15:57 +0100
changeset 4873 576dc9a44d18
parent 4871 38df9d8488f4
child 4874 dc4a481c43c5
child 4875 e47db739d7d1
#FEATURE class: SelectionInListModelView added: #selectFirstVisibleLine
SelectionInListModelView.st
--- a/SelectionInListModelView.st	Sun Nov 22 01:33:45 2015 +0100
+++ b/SelectionInListModelView.st	Mon Nov 30 17:15:57 2015 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1999 by eXept Software AG
 	      All Rights Reserved
@@ -2541,6 +2539,16 @@
     self selection:(self nextSelectableAfter:0)
 !
 
+selectFirstVisibleLine
+    "select the first visible selectable element.
+     Model and/or actionBlock notification IS done."
+
+    |firstLineShown|
+    
+    firstLineShown := self yVisibleToLineNr:1.
+    self selection:(self nextSelectableAfter:firstLineShown-1)
+!
+
 selectFrom:aStart to:aStop
     "select lines between start and stop
     "