Ultra Light Client Guide and Reference


Resource classes

UlcFont
Specifies the font to be used in ULC widgets. Plain, bold and italic are the font styles currently available in ULC. They are defined in the pool dictionary UlcWidgetConstants (UlcFontBoldStyleBit, UlcFontItalicStyleBit).

To set the style of a font, use the following:

aUlcFont fontStyle: UlcWidgetConstants::UlcFontBoldStyleBit

To set the font to normal, use the following:

aUlcFont fontStyle: 0

To reset the font dynamically, you must use the #setFont: method.

UlcIcon
Specifies a GIF image to be used in buttons, labels, and menu items. The following code creates one with the name abc.gif:
UlcIcon fromFile: 'abc.gif'
UlcIcon fromFile: 'bitmaps\abc.gif'

Loading an icon resource from file uses CfsStream, so the file name passed when creating a new instance of UlcIcon can be a simple filename as well as a partially or fully qualified path name. In the ULC examples, all resources can be found in the bitmaps subdirectory of the program folder.

ULC also includes an optional caching facility on the User Interface for Icons and icons can now be cached in the UI persistently across sessions.

Note:The caching support is currently not available when the UI is running as an Applet.
See UlcIcon>>#cacheOnUI:.

UlcRGBColor
Specifies a color using standard RGB notation. Once created, color instances are immutable.

To create an instance, use the following:

|someColor|
someColor := (UlcRGBColor new) initializeRed:244 green:244 blue:244.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]