Purpose
A picture which is displayed in the background of the data area.
Class
Type
Access / Assign
Data Type
Bitmap
Description
This property allows for the display of a picture as the background in the data area of the browser.
So that the picture can be rendered visible, the background color must be set to transparent (BRUSHHOLLOW) with the method bBrowser:DataView. Further, the foreground color should be set to a suitable color also with bBrowser:DataView. For example, with a dark background picture, a bright foreground color should be chosen.
The background picture can be formatted with the method bBrowser:WallpaperView. Among other things, the orientation and the background color can be defined.
Samples
In the following sample a background picture is displayed in the data area of the bBrowser.
LOCAL odbsCUSTOMER AS bDBServer
LOCAL oBrowser AS bBrowser
// Create and show a browser
odbsCUSTOMER := bDBServer{"CUSTOMER"}
oBrowser := bBrowser{oOwner,;
1000,;
Point{0, 0},;
Dimension{300, 250}}
oBrowser:Use(odbsCUSTOMER)
oBrowser:Show()
// Define a wallpaper
oBrowser:Wallpaper := Bitmap{ResourceID{"bmpWallpaper", _GetInst()}}
oBrowser:WallpaperView := bViewStyle{,;
Brush{Color{COLORBLACK}},;
BALIGN_CENTER + BALIGN_VCENTER}
// The background color must be transparent
oBrowser:DataView:Background := Brush{BRUSHHOLLOW}
oBrowser:DataView:Foreground := Color{COLORWHITE}
// Redraw the bBrowser
oBrowser:Redraw()
In the following sample the background picture from the previous sample is removed and the default values in the bBrowser are activate again.
// Remove wallpaper
oBrowser:Wallpaper := NULL_OBJECT
// Remove foreground and background color
oBrowser:DataView:Background := NULL_OBJECT
oBrowser:DataView:Foreground := NULL_OBJECT
// Actualize the bBrowser
oBrowser:Refresh(TRUE)
See Also
Page url: http://www.YOURSERVER.com/index.html?bbrowser_wallpaper.htm