RefBitmap property (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

bool RefBitmap

Delphi Syntax

RefBitmap: Boolean

Overview

Refer to Bitmaps and Bitmap Lists.

Remarks

Indicates whether an assignment to the Bitmap property should do a copy or simply reference the source control's Bitmap property.

This is used mainly to communicate between the Main control. When this property is TRUE, any assignments to the Main Control's Bitmap property will cause the Main Control to reference the source control's Bitmap, instead of making a copy. This can be used to reduce memory load when dealing with large images.

When this property is FALSE, an assignment to the Main Control's Bitmap proprety will create a copy of the source control's Bitmap in memory.

Note:

When this property is set to True, any assignment to the Main Control's Bitmap property will invalidate the bitmap in the source control. If the source control is a Main Control, its ForceRepaint method should be called.

You should set this property back to False after making an assignment if you do not always wish to make references. For example:

LEAD1.RefBitmap = True
LEAD1.Bitmap = Lead2.Bitmap
Lead2.ForceRepaint;
LEAD1.RefBitmap = False

See Also

Elements:

Main Bitmap property