Classes

Member variable XbpPushButton():caption Foundation

The caption of the pushbutton.

Attribute: EXPORTED
Data type: Character string, Numeric, Object
Description

The caption is the part of the XbpPushButton object which is displayed within the area of the pushbutton. The caption can be a character string, an icon or a bitmap. If it is a character string, the string itself is assigned to the instance variable :caption. If the caption is a bitmap, either a numeric resource ID of a BITMAP resource (Windows Bitmap file format) or an XbpBitmap object is assigned to the instance variable. If a resource ID is used, it must be a BITMAP resource defined in a resource file that is linked to the EXE file. To use an icon as caption, an XbpIcon object must be assigned. In all cases, the assignment must occur before the method :create() is executed. Using an XbpBitmap object to define the caption allows the display of images defined in various image file formats. Furthermore, if a transparent color has been defined for the bitmap object, transparent areas in the image are automatically replaced with the background color defined for the XbpPushbutton object.

If an XbpBitmap or XbpIcon object is assigned to the :captionproperty, one of the methods :load() or :loadFile() must have been previously called. If the bitmap is constructed in memory, the method :make() must have been used. Moreover, the use of a bitmap or icon object to load a different image while it is assigned to a pushbutton is discouraged. Instead, a new bitmap or icon object should be created for that purpose.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.