Border  Category

Chapter 3: DataWindow Object Properties

Brush.property

Description

Settings for the fill pattern and color of a graphic control.

NotePocketBuilder The Brush.Hatch property is not supported in PocketBuilder applications.

Applies to

Oval, Rectangle, and RoundRectangle controls

Syntax

PocketBuilder dot notation:

dw_control.Object.controlname.Brush.property

Describe and Modify argument:

"controlname.Brush.property { = ' value ' }"

Parameter

Description

controlname

The name of the Line, Oval, Rectangle, RoundRectangle, or Text control whose Brush property you want to get or set.

property

A property that applies to the Brush characteristics of a control, as listed in the table below.

value

Values for the properties are shown below. Value can be a quoted DataWindow expression.

Property for Brush

Value

Color

(exp) A long expression specifying the color (the red, green, and blue values) to be used to fill the control.

Hatch

(exp) A number expression specifying the fill pattern of controlname. Values are:

  • 0 — Horizontal

  • 1 — Bdiagonal (lines from lower left to upper right)

  • 2 — Vertical

  • 3 — Cross

  • 4 — Fdiagonal (lines from upper left to lower right)

  • 5 — DiagCross

  • 6 — Solid

  • 7 — Transparent

Usage


In the painter

Select the control and set the value in the Properties view, General tab.

When you choose a Brush Hatch fill pattern other than Solid, the Background Color and the Brush Color are used for the pattern colors.

Examples

Example 1

string ls_data

ls_data = dw_1.Object.oval_1.Brush.Hatch

Example 2

dw_1.Object.oval_1.Brush.Hatch = 5

Example 3

ls_data = dw_1.Describe("oval_1.Brush.Hatch")

Example 4

dw_1.Modify("oval_1.Brush.Hatch='5'")

Example 5

dw_1.Modify("oval_1.Brush.Color='16731766'")





Copyright © 2004. Sybase Inc. All rights reserved. Category

View this book as PDF