*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Fri, 13 Mar 2009 19:15:27 +0100
changeset 3668 e1888e938d68
parent 3667 acb358ca4b0b
child 3669 6cec5bc8f664
*** empty log message ***
LinkButton.st
--- a/LinkButton.st	Fri Mar 13 19:14:59 2009 +0100
+++ b/LinkButton.st	Fri Mar 13 19:15:27 2009 +0100
@@ -39,6 +39,19 @@
                        }.
     l foregroundColor:Color blue.
     v open
+
+
+    |v l|
+
+    v := StandardSystemView new.
+    l := LinkButton in:v.
+    l labelsAndActions:{ 
+                        'Hello' -> nil.
+                        ' ' -> nil.
+                        'World' -> [ Transcript showCR:'World Clicked'].
+                       }.
+    l foregroundColor:Color blue.
+    v open
 "
 ! !
 
@@ -90,7 +103,7 @@
 
 initialize
     super initialize.
-    adjust := #left.
+    "/ adjust := #left.
     self enableMotionEvents
 ! !
 
@@ -118,9 +131,12 @@
 
     self labelsAndActionsWithPositionsDo:[:lbl :action :leftX :rightX |
         |l|
+
         l := lbl.
-        (entered and:[mousePoint notNil and:[mousePoint x between:leftX and:rightX]]) ifTrue:[
-            l := l allUnderlined
+        action notNil ifTrue:[
+            (entered and:[mousePoint notNil and:[mousePoint x between:leftX and:rightX]]) ifTrue:[
+                l := l allUnderlined
+            ].
         ].
         self displayString:l x:leftX y:y.
     ].
@@ -161,5 +177,5 @@
 !LinkButton class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/LinkButton.st,v 1.4 2009-03-13 13:57:48 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/LinkButton.st,v 1.5 2009-03-13 18:15:27 cg Exp $'
 ! !