added: #string:image:
authorClaus Gittinger <cg@exept.de>
Tue, 20 Oct 2009 15:00:44 +0200
changeset 3781 715591d6adff
parent 3780 14184c505e24
child 3782 729c0808727b
added: #string:image: changed: #documentation
LabelAndIcon.st
--- a/LabelAndIcon.st	Mon Oct 19 22:55:32 2009 +0200
+++ b/LabelAndIcon.st	Tue Oct 20 15:00:44 2009 +0200
@@ -37,7 +37,10 @@
 
 documentation
 "
-    an icon and a string, side by side.
+    an icon, a string and an image side by side (from left to right).
+    Each may be nil (i.e. with nil image, it's a Label-and-Icon proper (icon to the left of the string);
+    with nil icon, it's a string with an image to the right.
+
     Usable as list entries in a listView (a fileList), as
     popUpMenuItems or as Label/Button image.
 
@@ -231,6 +234,12 @@
     ^ self new icon:nil string:aString
 
     "Created: / 21.6.1998 / 04:57:28 / cg"
+!
+
+string:aString image:image
+    "return an instance consisting of a label-string and an image (on the right)"
+
+    ^ self new form:nil image:image string:aString
 ! !
 
 !LabelAndIcon methodsFor:'accessing'!
@@ -503,5 +512,9 @@
 !LabelAndIcon class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/LabelAndIcon.st,v 1.39 2008-06-28 11:46:01 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/LabelAndIcon.st,v 1.40 2009-10-20 13:00:44 cg Exp $'
+!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/libwidg2/LabelAndIcon.st,v 1.40 2009-10-20 13:00:44 cg Exp $'
 ! !