Bitmap                                                                                                          Object

BITMAPS are powerful objects that allow images to be displayed and can execute code when they are tapped on. The image to be displayed is set at design time. A Bitmap ID (stored in the Bitmaps folder in the Project Explorer) can only be used in a single Bitmap object.

 

Gradient Buttons and Labels: You can create objects that have a background that gradually goes from one color at the top to another at the bottom. At compile time, the image is transferred into a bitmap resource in the project, and saved as a file in \NSBasic_Symbian\bitmaps\<projectName>.

               

The properties which control gradients are:

Gradient Color1: The top (or left) color.

                Gradient Color2: The bottom (or right) color

Gradient Style:  1 for top to bottom, 0 for left to right.

                  

You can use a Bitmap instead of a Label object of the same size. Since Bitmap objects can have a script (just like a Button object), BitMap object buttons work the same way as Button object buttons - but there are more options on how they can appear.

               

Caption and Fonts: Bitmaps can have text on them, using any font that is on your desktop system. The properties are:

Caption: The text to appear

Alignment: 0 for left, 1 for right, 2 for centered.

                Appearance: 0 for flat, 1 for 3D

                Border Style: 0 for none, 1 for 1 border around the image.

                Caption Color: The color of the text.

                Font Name: The name of the font. Can use any font installed on your system.

                FontSize: The size of the letters.

                FontBold: Are the characters in boldface?

                FontItalic: Are the characters italicized?

                FontStrikeThru: Is there a line through the characters?

                FontUnderline: Is there a line under the characters?

                               

Images on Bitmaps: You can specify the image to appear on a bitmap as well as its size. A Bitmap can use either Gradients, Captions and Fonts or an Image – not both. The properties are:

                Picture: The pathname to the image. It can be bmp, gif, jpg and other format.

Stretch: If False, the image will be the size of the original image, aligned at the top left. If the image if larger than the bitmap object, it will be clipped. If Stretch is True, the image will be scaled to fit the current size of the bitmap object.

               

The maximum size of a bitmap's image is 65,512 bytes. The formula for calculating the size of an image is (width * height) * 8.

 

Properties Supported (Set at design time)

Alignment, Appearance, Bitmap ID, BorderStyle, Caption, Caption Color, Font Name, Font Bold, Font Italic, Font Size, Font Strikthru, Font Underline, Gradient Color 1, Gradient Color 2, Gradiant Style, Picture, Stretch, Visible

 

Methods Supported (See "Methods")

Hide, ID, Show, Index, Type, Left, Top