Picture, DownPicture, DisabledPicture
These properties let you associate images with various aspects of certain controls. The meaning of Picture varies according to the control—in fact, for a couple of controls, it's an array property.
Usage |
oObject.Picture = cPictureFile lstList.Picture( nIndex )= cPictureFile cboCombo.Picture( nIndex )= cPictureFile cPictureFile = oObject.Picture | lstList.Picture( nIndex ) | cboCombo.Picture( nIndex ) |
Class |
Meaning |
If Style is 1-Graphical, picture is displayed above caption. If Style is 0-Standard, Picture is ignored. |
|
Picture is an array property. Each element corresponds to one item in the list and is displayed next to that item. The array is indexed in ListIndex (not ListItemId) order. |
|
Picture is displayed above caption on button. |
|
Picture is displayed in Class Designer and Form Designer to identify object, invisible at runtime. |
|
Picture is tiled to form wallpaper. |
|
Picture is displayed in control. |
Example |
* Let the user assign a picture to each item in a list. * This code might be in the Init for the list. More * realistically, the data might have pointers to the appropriate * picture files. The user won't appreciate having to point to * all the pictures. LOCAL nCnt FOR nCnt = 1 TO This.ListCount This.Picture[ nCnt ] = GETPICT("BMP;ICO;GIF;JPG", ; "Choose a picture") ENDFOR |
Usage |
oObject.DownPicture = cPictureFile oObject.DisabledPicture = cPictureFile cPictureFile = oObject.DownPicture | oObject.DisabledPicture |
Example |
* Set up a graphical check box. This.Style = 1 This.Picture = HOME(4)+"BITMAPS\OUTLINE\CLOSED.BMP" This.DownPicture = HOME(4)+"BITMAPS\OUTLINE\OPEN.BMP" |
See Also |