psImageChecked - cCJAction
Assigns the checked image for this action
Type: Property
Access: Read/Write
Data Type: String
Parameters: None
Syntax
Property String psImageChecked
| Access Type | Syntax |
|---|---|
| Read Access: | Get psImageChecked to StringVariable |
| Write Access: | Set psImageChecked to StringVariable/Value |
Description
Normally, a single image, psImage, can be used to represent all of the different item states (normal, pressed, checked, disabled and hot). The menu system will adjust the images as needed. If you find these individual adjustments to be unsatisfactory you can assign special images for the different states using psImagePressed, psImageChecked, psImageDisabled and psImageHot).
The image type is determined by the file extension in the passed image name: .bmp, .ico, .jpg, .png, .gif are all supported.
Sample
Object oMyMenuItem is cCJMenuItem
Set psCaption to "Select Me"
Set psToolTip to "Select Me in tooltip"
Set psDescription to "Select Me in idle statusbar pane"
Set psImage to "SelectMe.ico"
Set psImageChecked to "SelectMeChecked.ico"
Set psImageHot to "SelectMeHot.ico"
Set psImageDisabled to "SelectMeDisabled.ico"
Set psImagePressed to "SelectMePressed.ico"
Procedure OnExecute
Showln "Select Me was selected"
End_Procedure
End_Object
Image Mask Color
The image mask color determines how the various image states (normal, disabled, hot, etc.) are rendered. This data is provided in icon files. With bitmap files this color is determined by using the image's top left corner.
Design-time and Dynamic Images
This property is a design-time property. It determines what the image will be when the commandbar system is created. After the commandbar system is created, changing this property will not change the image.
If you wish to change an image dynamically you can use the piIconId property. This will assign an image from the command bar system's image list to an item. In such a case, the image must be added to the image list using the cCJCommandBarSystem's AddImage method.