Navigation:  Classes > bGrid >

bGrid:Init()

Print this Topic    Previous pageReturn to chapter overviewNext page

Purpose

Creates an object of the class bGrid.

Class

bGrid

Type

Method

Syntax

bGrid{

[<iStyle>],

[<iSpaceLeft>],

[<iSpaceTop>],

[<iSpaceRight>],

[<iSpaceBottom>],

[<oForeground>]

} Æ oGrid

 

bGrid{

[<iStyle>],

[<oInnerSpace>],

[<oOuterSpace>],

[<oForeground>]

} Æ oGrid

Arguments

<iStyle>The style of the grid. The following constants are supported:

 

Style

Appearance

BGRID_NONE

The grid does not have horizontal and vertical lines.

BGRID_OUTLINE

BGRID_OUTLINE

BGRID_OUTLINEHORIZONTAL

BGRID_OUTLINEHORIZONTAL

BGRID_OUTLINEVERTICAL

BGRID_OUTLINEVERTICAL

BGRID_CONVEX

BGRID_CONVEX

BGRID_CONVEXSMOOTH

BGRID_CONVEXSMOOTH

BGRID_AUTO

The appearance of the Grid depends on the context in that the grid is used.

 

If the argument is not specified, the value BGRID_NONE is used as a default.

Data type:Integer

 

<iSpaceLeft>The space between the left line of the grid and the interior area. The default value is dependent on the grid style and is specified in the table below.
Data type:Integer

 

<iSpaceTop>The space between the top line of the grid and the interior area. The default value is dependent on the grid style and is specified in the table below.
Data type:Integer

 

<iSpaceRight>The space between the right line of the grid and the interior area. The default value is dependent on the grid style and is specified in the table below.
Data type:Integer

 

<iSpaceBottom>The space between the bottom line of the grid and the interior area. The default value is dependent on the grid style and is specified in the table below.
Data type:Integer

 

<oInnerSpace>The space between the lines of the grid and the interior area. The default value is dependent on the grid style and is specified in the table below.
Data type:bRectangle

 

<oOuterSpace>The space between the exterior area and the lines of the grid. The default value is dependent on the grid style and is specified in the table below.
Data type:bRectangle

 

<oForeground>The color in which the grid should to be drawn. The color is supported only with the following grid styles:
BGRID_OUTLINE
BGRID_OUTLINEHORIZONTAL
BGRID_OUTLINEVERTICAL

If the argument is not specified, the default color is used.

Data type:Color

Return Value

oGridThe created object of the class bGrid.
Data type:bGrid

Description

bGrid:Init() creates a new object of the class bGrid and initializes it.

 

The figure below shows the different spaces of a grid:

 

bGridSpace

 

The table below specified the default values for the grid styles:

 

Style

Appearance

Flat

Width

Height

InnerSpace

(Left/Top/Right/Bottom)

OuterSpace

(Left/Top/Right/Bottom)

BGRID_NONE

The grid does not have horizontal and vertical lines.

TRUE

0

0

2 / 1 / 2 / 1

0 / 0 / 0 / 0

BGRID_OUTLINE

BGRID_OUTLINE

TRUE

1

1

2 / 1 / 2 / 1

-1 / -1 / 0 / 0

BGRID_OUTLINEHORIZONTAL

BGRID_OUTLINEHORIZONTAL

TRUE

0

1

2 / 1 / 2 / 1

0 / -1 / 0 / 0

BGRID_OUTLINEVERTICAL

BGRID_OUTLINEVERTICAL

TRUE

1

0

2 / 1 / 2 / 1

-1 / 0 / 0 / 0

BGRID_CONVEX

BGRID_CONVEX

FALSE

2

2

1 / 0 / 1 / 0

0 / 0 / 0 / 0

BGRID_CONVEXSMOOTH

BGRID_CONVEXSMOOTH

FALSE

1

1

2 / 0 / 2 / 0

0 / 0 / 0 / 0

BGRID_AUTO

The appearance of the Grid depends on the context in that the grid is used.

 

Note:
If the style is used for the bBrowser, then the InnerSpace and OuterSpace should be defined with the following values, too:

InnerSpace:bRectangle{2, 1, 2, 1}
OuterSpace:bRectangle{-1, -1, 0, 0}

TRUE

0

0

2 / 2 / 2 / 2

0 / 0 / 0 / 0

See Also

bGrid:Foreground

bGrid:InnerSpace

bGrid:OuterSpace

bGrid:Style

bGrid:SpaceLeft

bGrid:SpaceTop

bGrid:SpaceRight

bGrid:SpaceBottom

 


Page url: http://www.YOURSERVER.com/index.html?bgrid_init.htm