|
Class: LabelAndTwoIcons
Object
|
+--ListEntry
|
+--ModelListEntry
|
+--LabelAndIcon
|
+--LabelAndTwoIcons
- Package:
- stx:libwidg2
- Category:
- Views-Support
- Version:
- rev:
1.5
date: 2016/08/09 10:47:13
- user: stefan
- file: LabelAndTwoIcons.st directory: libwidg2
- module: stx stc-classLibrary: libwidg2
like a LabelAndIcon, but adds another image to the right of the string.
Notice:
This is different from ST-80's LabelAndIcon class, which
inherits from Label. Therefore, things may change in the future.
copyrightCOPYRIGHT (c) 2009 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
accessing
-
image2
-
return my second image (right of string)
-
image2: anImage
-
set the image2 (right of string)
displaying
-
displayOn: aGC x: x y: y opaque: opaque
-
display the receiver on a GC
queries
-
heightOn: aGC
-
return the height of the receiver, if it is to be displayed on aGC
-
widthOn: aGC
-
return the width of the receiver, if it is to be displayed on aGC
in a button/label:
|top l image|
image := Image fromFile:'../../goodies/bitmaps/xpmBitmaps/countries/brazil.xpm'.
l := (LabelAndTwoIcons icon:image string:'brazil').
l image2:image.
top := Button label:l.
top open.
| two images in a button/label:
|top l image1 image2|
image1 := Image fromFile:'../../goodies/bitmaps/xpmBitmaps/countries/brazil.xpm'.
image2 := Image fromFile:'../../goodies/bitmaps/xpmBitmaps/countries/germany.xpm'.
l := (LabelAndIcon form:image1 image:image2 string:'directory').
top := Button label:l.
top open.
|
|