Returns or sets whether the picture is drawn as clipped or stretched on the object.
Object.PictureDrawMode [ = enDrawMode ]
The PictureDrawMode property syntax has the following parts:
Name |
Type |
Description |
Object |
AButton |
AButton control |
enDrawMode |
enumAButtonPictureDrawMode |
An integer specifying whether the Picture object is drawn as clipped or stretched . |
enumAButtonPictureDrawMode can be one of the following:
Name |
Value |
Description |
abtnClipped |
0 * |
The picture height and width are calculated from the bitmap size. The PictureHeight and PictureWidth properties are set to the picture size. The picture is clipped to the control face area (inside the shadow area). |
abtnStretched |
1 |
The size is determined using the PictureWidth or 5% from the edge or from the text if aligned to text. |
The PictureDrawMode, as well as the PictureAlignment, can be overridden by the user selecting other values on the 'Layout' tab of the Properties menu of the AButton. A picture can also be used as the background with text over it for some attractive combinations.
The following statement changes the AButton's PictureDrawMode so the picture is stretched to within five percent of the width of the button's inner area:
btn1.PictureDrawMode=abtnStretched
Picture, PictureAlignment, PictureHeight, PictureLeft, PictureTop, PictureWidth