#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Thu, 16 Jan 2020 14:34:31 +0100
changeset 8965 5b5515990617
parent 8964 7ab1983c012d
child 8966 7cbb2e039c8f
#FEATURE by cg class: SimpleView added: #flashRectangle: #flashRectangle:withColor:
SimpleView.st
--- a/SimpleView.st	Thu Jan 16 14:32:33 2020 +0100
+++ b/SimpleView.st	Thu Jan 16 14:34:31 2020 +0100
@@ -10609,6 +10609,26 @@
     self flash:(resources string:'Read Only')
 !
 
+flashRectangle:rect
+    "flash part of the view - fill it black, then white, finally redraw.
+     Can be used to bring attention to some line/part of view"
+
+    shown ifFalse:[^ self]. 
+    self flashRectangle:rect withColor:nil
+
+    "
+     |v|
+
+     v := View new openAndWait.
+     Delay waitForSeconds:2.
+     v flashRectangle:(10@10 corner:50@50).
+     Delay waitForSeconds:2.
+     v destroy
+    "
+
+
+!
+
 flashRectangle:rect withColor:flashColor
     "flash part of the view - fill it flashColor, then white, 
      finally redraw.
@@ -10634,7 +10654,7 @@
 
      v := View new openAndWait.
      Delay waitForSeconds:2.
-     v flash:'Hello World' withColor:Color red.
+     v flashRectangle:(10@10 corner:50@50) withColor:Color red.
      Delay waitForSeconds:2.
      v destroy
     "