[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
SETMAXCOL()
Sets the number of columns for a virtual screen
------------------------------------------------------------------------------
Syntax
SETMAXCOL(<nLastColumn>, [<nScrollBorder>])
--> lSuccessful
Arguments
<nLastColumn> Designates the rightmost column that the extended
driver supports for screen output. The highest value possible is 253,
assuming sufficient screen memory is available. Only odd numbers of
columns are permitted because the value is 0-based.
<nScrollBorder> Designates the left and right column borders that
move the screen when crossed by the cursor. Values from 0 to
MAXCOL(.T.)/2 are valid. Larger values are corrected to the maximum
value. When a value is passed for this parameter, scroll is turned on.
When no parameter is passed, scroll is off.
Returns
SETMAXCOL() returns .T. when <nLastColumn> is successfully set.
Description
This function allows you to set the number of columns that the extended
driver accepts for CA-Clipper screen output. Two different types of
screen output can be determined:
Special Screen
It is possible to use full page screens or other special screens that
display more than 80 columns, and whose column count is not
automatically recognized by the BIOS (this is always hardware based).
These screens must be compatible with the usual screen adapter with
regard to the organization of the screen memory (character attributes),
the attribute bytes themselves, and the basic address of the screen
memory. The function doesn't switch any modes; the internal settings of
the extended drivers are simply adjusted. Specific screen settings must
be carried out through the hardware's driver module.
Virtual Screen
It is also possible to set a column count higher than what can be
displayed on the screen. In this case there is only a portion of the
total screen memory visible. If a CA-Clipper input command (such as
GET/READ) is built larger than the visible area, the extended driver
automatically moves screen memory in accordance with cursor movement.
This movement always occurs when the cursor moves beyond the left or the
right borders set in <nScrollBorder>. In this way, the portion of text
that is worked on is always visible. The visible area of the virtual
screen can also be set using the FIRSTCOL() function if needed.
Virtual screens are possible on CGA, EGA, and VGA adapters as well as
those that can fully emulate them. The maximum number of columns you
can install, assuming a 25-line and 80-column mode (CGA80() or
MONOCHROME()), can be determined in the following manner:
nColumns := (MAXPAGE() +1) * 2048 / 25
nMaxColumn := MIN(INT(nColumn /2) * 2, 253)
With eight screen pages you will have a value of >255. In other words a
maximum of 254 columns can be used, which exactly equals the maximum
value for SETMAXCOL() of 253. To switch back to the number of actually
displayed columns, call the function with the corresponding value and no
border.
Notes
. We are not able to provide any kind of technical support when
unknown screen hardware is used. Full page screens do exist on the
market which fulfill the conditions described above.
. Changing the number of columns breaks down the existing screen
contents and renders it unusable. This switch should always be
linked to a CLEAR.
. Virtual screens use the memory area for additional screen
pages. The number of screen pages decreases in proportion to the
growth of the virtual screen.
. If the <nScrollBorder> is larger than or equal to half of the
visible columns, then the display in the middle of the screen is
scrolled under the cursor.
. If the cursor is switched off, the automatic scroll depends
only on keyboard input.
. When windows are open, the column count cannot be changed,
regardless of the automatic scroll setting.
Examples
. Set the number of columns to 96 (special screen):
SETMAXCOL(95) // 96 columns
@ 10, 80 SAY "CA-Clipper"
. Switch a VGA adapter already in 50-line mode (VGA50()) to a
virtual 100-column mode with a border of 3 characters:
CLEAR // Best to have the screen clear
? SETMAXCOL(99, 3) // Returns .T. if successful
. Switch off the automatic scroll:
SETMAXCOL(MAXCOL(.T.))
See Also:
SETMAXROW()
FIRSTCOL()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson