Bitmap (PRIM_BMP)

Bitmap is an image file in the repository

Ancestors - Graphic (PRIM_FLBX) Object (PRIM_OBJT)

Details

A Bitmap component can be used to store images files in the LANSA repository.
 
Originally limited to just BMP files, Bitmaps can also store JPG, JPEG and PNG files.
 
Once enrolled, these images can be used on buttons, list items and many other places in an application.
 
Enrolled images are easy to deploy as part of the application and are compiled in to the DLL generated for desktop components.
 
PRIM_BMP is an abstract class. The Sys_Appln.CreateBitmap  method can be used to create an instance at runtime.

Example

In this example an image stored in a BLOB field is used to populate the image.
#Image.FileName := #Empimg
In this example a bitmap instance is created from a file.
Define_Com Class(#Prim_bmp) Name(#Bitmap) Reference(*Dynamic)
 
#Bitmap <= #Sys_Appln.CreateBitmap(#FilePath)

Properties

NameDescription
BitsPerPixelNumber of bits per pixel
ComponentClassNameComponentClassName is the name of the component's class. Inherited from Object (PRIM_OBJT)
ComponentMembersComponentMembers provides access to all the member components of this component Inherited from Object (PRIM_OBJT)
ComponentPatternNameComponentPatternName is used to qualify the class of the component. Inherited from Object (PRIM_OBJT)
ComponentTagGeneric space allowing a value to be stored for the instance Inherited from Object (PRIM_OBJT)
ComponentTypeComponentType gives you access to the type information about the component Inherited from Object (PRIM_OBJT)
ComponentTypeNameComponentTypeName is the fully qualified name of the component's class. Inherited from Object (PRIM_OBJT)
CompressionTypeImage Compression Type
FileNameFileName is used to specify an image file
HeightHeight of the image in pixels
ImageCountNumber of images
ImageTypeImage Format
IsLoadedTrue when the bitmap source file has been loaded
MaskColorColor used to identify the background of the image
NameName identifies the component Inherited from Object (PRIM_OBJT)
OwnerOwner owns this component Inherited from Object (PRIM_OBJT)
ParentThe component instance to which this instance is attached. The visual container for a control or the collector of a set of child instances Inherited from Object (PRIM_OBJT)
StandardImageUse on of the standard application images
UseMaskColorUse the mask color as the background
WidthWidth of the image in pixels

Events

NameDescription
CreateInstanceCreateInstance is signalled when an instance of a component is created Inherited from Bitmap (PRIM_BMP)
DestroyInstanceDestroyInstance is signalled when an instance of a component is about to be destroyed Inherited from Bitmap (PRIM_BMP)
FailedFired if the image fails to load for any reason
LoadedFired when the bitmap source has been loaded

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020