dbicLabel Send comments on this topic.
Developing with dbicLabel - Using Custom Images and Masking

Glossary Item Box

Using Custom Images and Masking

 

The dbicLabel control is designed to host a custom image as part of the label being presented.  When the control is first instantiated on a form the object is rendered as a rectangle.

 

 

To customize the presentation select a custom image by clicking the elipse button in the Image property found in the Property Inspector in the IDE.  NOTE:  The control also has a BackgroundImage property.  The control has no ability to mask colors in the image when placed here.  NOTE: The custom image can be set at design time through the property inspector or at run time in code by specifying the path to the image in the Image property.  The selected image is rendered in the control positioned in accordance with the ImageAlign property setting.  NOTE: The image is not resized in any fashion.  Consequently, the selected image size should match the desired rendering size in the control.

 

 

In the example above the arrow image background (white) is different to the color of the background of the dbicLabel control.  To adjust the appearance to match the background, set the MaskColor property to the color value in the arrow image to “mask” out.  The control will present the mask color as the color in the background of the dbicLabel control; in essence making the image appear transparent where the mask color is found in the image.  In the above example, setting the MaskColor to White masks out the white area around the blue arrow …