Purpose
Draws a data value.
Class
Type
Method
Syntax
<oBrowser>:DrawValue(
<hDC>,
<symValueView>,
<uValue>,
<srcArea>,
<oGrid>,
<oFont>,
<iAlignment>,
<iValueOptions>,
<oForeground>,
<oBackground>,
<iAlphaBlendRatio>,
<lSelected>,
<lDeleted>,
<lEnabled>,
<lCurrent>
) Æ lDraw
Arguments
<hDC> | The DeviceContext in which the value must be drawn. |
Data Type: | Pointer |
<symValueView> | View style in which the value is to be drawn. The following styles are supported: |
View |
Description |
#Abstract |
For drawing this value, the callback method DrawValue is invoked in the owner of the bBrowser. An argument of class bDrawValueEvent is passed to the callback method. |
#Bitmap |
The value is drawn as Bitmap.
The argument <uValue> must be an object of class Bitmap. |
#Check |
The value is drawn as a Checkbox without box.
If the argument <uValue> contains TRUE or 1, the CheckBox is drawn in checked mode.
If the argument <uValue> contains FALSE or 0, the CheckBox is drawn in unchecked mode.
If the argument <uValue> contains 2, the CheckBox is drawn in checked mode with grey background. |
#CheckBox |
The value is drawn as a CheckBox.
If the argument <uValue> contains TRUE or 1, the CheckBox is drawn in checked mode.
If the argument <uValue> contains FALSE or 0, the CheckBox is drawn in unchecked mode.
If the argument <uValue> contains 2, the CheckBox is drawn in checked mode with grey background. |
#ComboBox |
The value is drawn as a ComboBox. |
#ComboEdit |
The value is drawn as a bComboEdit. |
#CompoundValue |
The value is drawn as a bCompoundValue.
The argument <uValue> must be an object of class bCompoundValue. |
#Icon |
The value is drawn as an icon.
The argument <uValue> must be an object of class Icon. |
#PushButton |
The value is drawn as a PushButton. |
#RTF |
The value is drawn as RTF text. |
#Text |
The value is drawn as singleline or multiline text. |
If the value NULL_SYMBOL is specified, the view style is determined depending on the data type of the argument <uValue>.
Data Type: | Symbol |
<uValue> | The value that is to be drawn. |
Data Type: | Usual |
<srcArea> | The rectangle structure that defines the area in which the value must be drawn. |
The structure must be specified by reference.
Data Type: | _winRect |
<oGrid> | The Grid that is around the value. The Grid is not drawn, but serves only for the evaluation. |
Data Type: | bGrid |
<oFont> | The font in which the value is to be drawn. The argument is used only with the view type #Text. |
Data Type: | Font |
<iAlignment> | The alignment with which the value is to be drawn within the defined area. |
Constant |
Description |
BALIGN_AUTO |
The default values for horizontal and vertical alignment are used. |
BALIGN_LEFT |
Left justified alignment. |
BALIGN_RIGHT |
Right justified alignment. |
BALIGN_CENTER |
Horizontal centered alignment. |
BALIGN_TOP |
Top justified alignment. |
BALIGN_BOTTOM |
Bottom justified alignment. |
BALIGN_VCENTER |
Vertical centered alignment. |
Data Type: | Integer |
<iValueOptions> | The bit mask in which indicates how the value is to be drawn. The following table lists the possible values: |
Option |
Description |
BVO_AUTO |
No specific options are defined. |
BVO_ASPECTRATIO |
In combination with the option BVO_STRETCHIMAGE the aspect ratios of a bitmap become retain. This can mean that the bitmap is not adjusted to the whole size of the draw area. |
BVO_END_ELLIPSIS |
If the value cannot be displayed completely, then the value will be truncated and ellipsis are be added.
The option can not be combined with: •BVO_RTF |
BVO_LINEBREAK |
If the value contains line break characters (CRLF), then the value is broken at these.
The option can not be combined with: •BVO_RTF |
BVO_RTF |
The value is displayed as RTF text.
The option can not be combined with: •BVO_END_ELLIPSIS •BVO_LINEBREAK |
BVO_STRETCHIMAGE |
If the value is a bitmap, then the size of the bitmap is adjusted to the size of the draw area. |
BVO_WORDBREAK |
If the value cannot be displayed completely in one line, then the value will be broken at words. |
Data Type: | DWord |
<oForeground> | The foreground color in which the value is to be drawn. |
Data Type: | Color |
<oBackground> | The background color of the area to which the value is to be drawn. |
Data Type: | Brush |
<iAlphaBlendRatio> | Mixture ratio for overlapping of two colors. The higher the value, the lower is the transparency.The lower the value and the more colors will mix. Supported values are 0 to 100 or the constants below: |
Constant |
Value |
BABR_NONE |
0 |
BABR_LIGHT |
12 |
BABR_NORMAL |
25 |
BABR_DARK |
45 |
BABR_SOLID |
100 |
BABR_AUTO |
0xFFFFFFFF |
The argument is only supported for Windows 2000 or newer operating systems. For older operating systems the value BABR_NONE should be used.
Data Type: | DWord |
<lSelected> | A logical value that indicates whether the value is to be drawn in selected state. In this case the argument <oForeground> is not used. |
Data Type: | Logic |
<lDeleted> | A logical value that indicates whether the value is to be drawn in deleted state. In this case the argument <oForeground> is not used. |
Data Type: | Logic |
<lEnabled> | A logical value that indicates whether the value is to be drawn in enabled or disabled state. In this case the argument <oForeground> is not used. |
Data Type: | Logic |
<lCurrent> | A logical value which indicates whether the value is under the cursor. |
Data Type: | Logic |
Return Value
lDraw | A logical value that indicates whether the value was drawn. |
TRUE | The value was drawn. |
FALSE | The value was not drawn. |
Data Type: | Logic |
Description
bBrowser:DrawValue() draws a single data value. The background of the value must have already been drawn. The value can be drawn both in selected and deleted state.
Page url: http://www.YOURSERVER.com/index.html?bbrowser_drawvalue.htm