<<

Contents

Search

>>

 

SCROLLPANE

 

 

Function

 

 

Syntax:

SCROLLPANE(<Row>,<Column>,<Height in Rows>,<Width in Columns>,<Height of Column Header>,<Width of Row Header>,<Type>,<Handle>)

 

<Row>

= <NUM-EXPRESSION>

<Column>

= <NUM-EXPRESSION>

<Height in Rows>

= <NUM-EXPRESSION>

<Width in Columns>

= <NUM-EXPRESSION>

<Height of Column Header>

= <NUM-EXPRESSION>

<Width of Row Header>

= <NUM-EXPRESSION>

<Type>

= <NUM-EXPRESSION>

<Handle>

= <NUM-EXPRESSION>

 

 

Meaning:

Creates a Scrollpane.

 

<Row> and <Column> specify the upper left corner and <Height in Rows> and <Width in Columns> specify the height and width of the Scrollpane in rows and columns.

 

<Handle> specifies to which window the instruction refers. <Handle> can contain the window depth or the handle of a split window or a WINDOWCALL window. If the parameter <Handle> is missing, the instruction refers to the current mask.

 

If handle is a handle of a split window the parameters <Row>, <Column>, <Height in Rows> and <Width in Columns> have no effect, the Scrollpane always uses the whole split window.

 

A Scrollpane consists of the following components:

 

 

The components of a Scrollpane can be filled with the following instructions:

 

CURSOR

PRINT

DRAWLINE

DRAWRECT

FILLRECT

FILLRECT_GRADIENT

CIRCLE

POLYGON

LOAD_PICTURE

GRAPHIC

CLS

 

With each instruction the handle of the component to which the instruction refers has to be specified.

 

The handle of a component of a Scrollpane can be obtained by the function GET_SCROLLPANE_HANDLE. Each component is specified by a number which has to be passed to the function.

 

Example:

 

HANDLE% = SCROLLPANE(...)

HANDLE_KOPFSPALTE% = GET_SCROLLPANE_HANDLE(HANDLE%,2)

 

<Type> specifies whether Column Header and/or Row Header are created.

 

<Typ2>

Meaning

1

Scrollpane with Column Header

2

Scrollpane with Row Header

3

Scrollpane with Column Header and Row Header

otherwise

Scrollpane without Column Header and withoutRow Header

 

The corners 4, 5 and 6 are only shown if the corresponding scrollbars are visible. The scrollbars are shown automatically when an element is added to the scrollarea which exceeds the size of the scrollarea.

 

Corner 3 is only display if the Scrollpane has a Column Header and a Row Header (<Type> = 3).

 

Attention: To increase speed the instruction NOREPAINT can be executed before elements are added to the scrollpane and REPAINT after elements have been added.

 

When the mouse cursor is within a component of a Scrollpane the variables EBUS_SCROLLPANE_MOUSE_ROW

and EBUS_SCROLLPANE_MOUSE_COL contain the mouse position within the component.

 

If with the instruction PRINT a handle of a Scrollpane component is specified, the instruction CURSOR refers to the upper left corner of the component, in other words the upper left corner of the component has the CURSOR coordinates (1,1).

 

SCROLLPANE returns the handle of the Scrollpane or -1 if the Scrollpane could not be created.

 

Parameter:

Row

Row of upper left corner of the rectangle

Column

Column of upper left corner of the rectangle

Height in Rows

Height of rectangle in rows

Width in Columns

Width of rectangle in columns

Height of Column Header

Height of Column Header in rows

Width of Row Header

Width of Row Header in columns

Type

specifies whether Column Header and/or Row Header are created

Handle

Window depth or handle of a split window or handle of a WINDOWCALL Window

 

Sample:

The figure above has been created with the following commands:

 

HANDLE% = SCROLLPANE(3,3,10,40,2,20,3,0)

 

H% = SET_SCROLLPANE_BACKGROUNDCOLOR(HANDLE%,0,255,255,255,-1,-1,-1,-1)

H% = SET_SCROLLPANE_BACKGROUNDCOLOR(HANDLE%,1,196,196,255,-1,-1,-1,-1)

H% = SET_SCROLLPANE_BACKGROUNDCOLOR(HANDLE%,2,255,196,196,-1,-1,-1,-1)

 

FOR I%=3 TO 6

    H% = SET_SCROLLPANE_BACKGROUNDCOLOR(HANDLE%,I%,0,196,0,-1,-1,-1,-1)

ENDLOOP

 

HANDLE_COLUMN_HEADER%      = GET_SCROLLPANE_HANDLE(HANDLE%,1)

HANDLE_ROW_HEADER%         = GET_SCROLLPANE_HANDLE(HANDLE%,2)

HANDLE_UPPER_LEFT_CORNER%  = GET_SCROLLPANE_HANDLE(HANDLE%,3)

HANDLE_UPPER_RIGHT_CORNER% = GET_SCROLLPANE_HANDLE(HANDLE%,4)

HANDLE_LOWER_LEFT_CORNER%  = GET_SCROLLPANE_HANDLE(HANDLE%,5)

HANDLE_LOWER_RIGHT_CORNER% = GET_SCROLLPANE_HANDLE(HANDLE%,6)

 

H% = FILLRECT(1,1,30,100,224,224,224,HANDLE%)

 

CURSOR(1.5,4,HANDLE_COLUMN_HEADER%) PRINT(HANDLE_COLUMN_HEADER%) "1 Column Header"

CURSOR(4,5)                         PRINT(HANDLE_ROW_HEADER%)    "2 Row Header"

CURSOR(4,6)                         PRINT(HANDLE%)               "0 Scrollarea"

 

CURSOR(1.5,2) PRINT(HANDLE_UPPER_LEFT_CORNER%) "3 Upper left corner"

 

PRINTFONTHEIGHT = 0.7

 

CURSOR(1.5,1.2)  PRINT(HANDLE_UPPER_RIGHT_CORNER%) "4";

CURSOR(0.85,10)  PRINT(HANDLE_LOWER_LEFT_CORNER%)  "5";

CURSOR(0.85,1.2) PRINT(HANDLE_LOWER_RIGHT_CORNER%) "6";

 

 

See also:

GET_SCROLLPANE_HANDLE

GET_SCROLLPANE_SIZE

SET_SCROLLPANE_BACKGROUNDCOLOR

SET_SCROLLPANE_ SIZE

CLOSE_SCROLLPANE

EBUS_SCROLLPANE_MOUSE_COL

EBUS_SCROLLPANE_MOUSE_ROW

EBUS_SCROLLPANE_MOUSE_HANDLE

EBUS_SCROLLPANE_MOUSE_PANEL

CURSOR

PRINT

DRAWLINE

DRAWRECT

FILLRECT

FILLRECT_GRADIENT

CIRCLE

POLYGON

LOAD_PICTURE

GRAPHIC

CLS