Description
Settings that control the background picture displayed in a DataWindow object. Picture properties are not supported in RichText, Graph, or OLE DataWindow presentation styles.
Applies to
DataWindows
Syntax
PowerBuilder dot notation:
dw_control.Object.datawindow.picture.property
Describe and Modify argument:
"DataWindow.picture.property { = value }"
Parameter |
Description |
---|---|
property |
A property for the picture background. Properties and their settings are listed in the table that follows. Picture properties are used only when the datawindow.brushmode value is 6. These properties are not available for RichText, Graph, or OLE DataWindow objects. |
value |
The value to be assigned to the property. For picture properties, value can be a quoted DataWindow expression. |
Property for Picture |
Value |
---|---|
Clip.Bottom |
An integer specifying the percentage to clip from the bottom edge of the background picture. Painter: Background tab, Picture group. |
Clip.Left |
An integer specifying the percentage to clip from the left edge of the background picture. Painter: Background tab, Picture group. |
Clip.Right |
An integer specifying the percentage to clip from the right edge of the background picture. Painter: Background tab, Picture group. |
Clip.Top |
An integer specifying the percentage to clip from the top edge of the background picture. Painter: Background tab, Picture group. |
File |
Painter: Background tab, Picture group. A string indicating the pathname for the picture file to be used for the DataWindow background. Supported formats are BMP, GIF, JPEG, RLE, WMF, and PNG. |
Mode |
An integer indicating the orientation and size of the background picture, and whether it is tiled. Tiling also depends on the Scale.X and Scale.Y values. Values are: 0 -- Original Size 1 -- Fit to Width 2 -- Fit to Height 3 -- Preserve Aspect Ratio/Max to Rect 4 -- Stretch to Fit 5 -- Tile 6 -- Flip X 7 -- Flip Y 8 -- Flip XY Painter: Background tab, Picture group. |
Scale.X |
An integer from 0 to 100 that indicates the horizontal size of the bitmap in relation to the horizontal size of the DataWindow object. If you set the Scale.X and Scale.Y properties to 100, the background picture will cover the entire DataWindow object. This property is used only when picture.tilemode is set to 5, 6, 7, or 8. Painter: Background tab, Picture group. |
Scale.Y |
An integer from 0 to 100 that indicates the vertical size of the bitmap in relation to the vertical size of the DataWindow object. If you set the Scale.X and Scale.Y properties to 100, the background picture will cover the entire DataWindow object. This property is used only when picture.tilemode is set to 5, 6, 7, or 8. Painter: Background tab, Picture group. |
Tranparency |
An integer in the range 0 to 100, where 0 means that the background bitmap is opaque and 100 that it is completely transparent. Painter: Background tab, Picture group. |
Usage
In the painter
Select the DataWindow object and set the value on the Background tab of the Properties view.
If you save to an EMF or WMF, the properties on the Background tab are not saved with the DataWindow.
This table explains the values for Picture.Mode:
Value |
Description |
---|---|
0 - Original Size |
The image is centered and not tiled to fit the DataWindow. |
1 - Fit to Width |
The image is stretched or compressed (depending on the aspect ratio) until its width matches that of the DataWindow control). |
2 - Fit to Height |
The image is stretch or compressed (depending on the aspect ratio) until its height matches that of the DataWindow control. |
3 - Preserve Aspect Ratio/Max to Rect |
The image is stretched or compressed (without distortion) until its width or height matches that of the DataWindow control without either of them exceeding the bounds of the DataWindow control. |
4 - Stretch to Fit |
The image is stretched to fill the DataWindow control, without preserving the aspect ratio. |
5 - Tile |
The image is tiled to fill the DataWindow. The number of repetitions will be affected by the values of picture.scale.x, picture.scale.y, and the picture.clip properties. |
6 - Flip X |
The image is used to fill the DataWindow by tiling and then it is flipped horizontally as you move from one tile to the next in a row. The number of repetitions will be affected by the values of picture.scale.x, picture.scale.y, and the picture.clip properties. |
7 - Flip Y |
The image is used to fill the DataWindow by tiling and then it is flipped vertically as you move from one tile to the next in a column. The number of repetitions will be affected by the values of picture.scale.x, picture.scale.y, and the picture.clip properties. |
8 - Flip XY |
The image is used to fill the DataWindow by tiling and then it is flipped horizontally as you move along the rows and vertically as you move along the columns. The number of repetitions will be affected by the values of picture.scale.x, picture.scale.y, and the picture.clip properties. |
Examples
dw_1.Modify("datawindow.brushmode=6") dw_1.Object.datawindow.picture.File="MyPic.bmp"