--- 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 $'
! !