|
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
- Author:
- Claus Gittinger
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.
ListEntry
Text
String
Icon
ListView
SelectionInListView
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.
|
|