added #replaceFrom:to:with:startingAt:
authorClaus Gittinger <cg@exept.de>
Wed, 30 Aug 2000 18:04:36 +0200
changeset 2248 c6cb654bb807
parent 2247 7994ab3193f9
child 2249 d0d327fefcc3
added #replaceFrom:to:with:startingAt:
ListView.st
--- a/ListView.st	Wed Aug 30 18:04:13 2000 +0200
+++ b/ListView.st	Wed Aug 30 18:04:36 2000 +0200
@@ -1000,6 +1000,22 @@
     ^ true
 !
 
+replaceFrom:startLineNr to:endLineNr with:aCollection startingAt:replStartIndex
+    "replace some lines"
+
+    list replaceFrom:startLineNr to:endLineNr with:aCollection startingAt:replStartIndex.
+
+    widthOfWidestLine := nil. "/ i.e. unknown
+    self textChanged.
+
+    ((startLineNr <= self lastLineShown)
+    and:[endLineNr >= firstLineShown]) ifTrue:[
+        self invalidate.
+    ].
+
+    self contentsChanged.
+!
+
 setContents:something
     "set the contents (either a string or a Collection of strings)
      dont change position (i.e. do not scroll).
@@ -4207,5 +4223,5 @@
 !ListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.237 2000-08-30 13:11:24 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.238 2000-08-30 16:04:36 cg Exp $'
 ! !