eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'LabelAndTwoIcons':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: LabelAndTwoIcons


Inheritance:

   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

Description:


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.


Related information:

    ListEntry
    Text
    String
    Icon
    ListView
    SelectionInListView

Instance protocol:

accessing
o  image2
return my second image (right of string)

o  image2: anImage
set the image2 (right of string)

displaying
o  displayOn: aGC x: x y: y opaque: opaque
display the receiver on a GC

queries
o  heightOn: aGC
return the height of the receiver, if it is to be displayed on aGC

o  widthOn: aGC
return the width of the receiver, if it is to be displayed on aGC


Examples:


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.


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Tue, 19 Mar 2024 08:11:41 GMT