Tag Archives: MAXCOL()
Harbour Terminal Functions
SetMode()
SetMode()
Change the video mode to a specified number of rows and columns
Syntax
SetMode( <nRows>, <nCols> ) --> lSuccess
Arguments
<nRows> is the number of rows for the video mode to set.
<nCols> is the number of columns for the video mode to set.
Returns
SetMode() returns true if the video mode change was successful; otherwise, it returns false.
Description
SetMode() is a function that change the video mode depend on the video card and monitor combination, to match the number of rows and columns specified. Note that there are only a real few combination or rows/cols pairs that produce the video mode change. The followings are availables for GTDOS:
12 rows x 40 columns 12 rows x 80 columns 25 rows x 40 columns 25 rows x 80 columns 28 rows x 40 columns 28 rows x 80 columns 50 rows x 40 columns 43 rows x 80 columns 50 rows x 80 columns
The follow modes are available to Windows :
25 rows x 40 columns 25 rows x 80 columns 50 rows x 40 columns 43 rows x 80 columns 50 rows x 80 columns
Some modes only are availables for color and/or VGA monitors. Any change produced on the screen size is updated in the values returned by MaxRow() and MaxCol().
Examples
// The first example change to a 12 lines of display mode: IF SetMode( 12, 40 ) ? "Hey man are you blind ?" ELSE ? "Mom bring me my glasses!" ENDIF // Next example change to a 50 lines mode: IF SetMode( 50, 80 ) ? "This wonderful mode was successfully set" ELSE ? "Wait. this monitor are not made in rubber !" ENDIF
Compliance
Some of these modes are not availables in CA-Cl*pper
Platforms
DOS, Win
Seealso
MaxCol(), MaxRow()
Row()
ROW()
Returns the current screen row position
Syntax
ROW() --> nPosition
Arguments
None.
Returns
<nPosition> Current screen row position
Description
This function returns the current cursor row location. The value for this function can range between 0 and MAXCOL().
Examples
? Row()
Compliance
Clipper
Platforms
All
Files
Library is rtl
Seealso
COL(), MAXROW(), MAXCOL()
MaxRow()
MAXROW()
Returns the current screen row position
Syntax
MAXROW() --> nPosition
Arguments
None.
Returns
<nPosition> The maximun number of rows possible in current video mode
Description
This function returns the current cursor row location. The value for this function can range between 0 and MAXCOL().
Examples
? MAXROW()
Compliance
Clipper
Platforms
Linux(GT), OS2(GT), Win(GT)
Files
Library is rtl
Seealso
COL(), ROW(), MAXCOL()
Col()
COL()
Returns the current screen column position
Syntax
COL() --> nPosition
Arguments
None.
Returns
<nPosition> Current column position
Description
This function returns the current cursor column position. The value for this function can range between 0 and MAXCOL().
Examples
? Col()
Compliance
Clipper
Platforms
All
Files
Library is rtl
Seealso
ROW(), MAXROW(), MAXCOL()
Browse()
BROWSE()
Browse a database file
Syntax
BROWSE( [<nTop>, <nLeft>, <nBottom>, <nRight>] ) --> lOk
Arguments
<nTop> coordinate for top row display.
<nLeft> coordinate for left column display.
<nBottom> coordinate for bottom row display.
<nRight> coordinate for right column display.
Returns
BROWSE() return .F. if there is no database open in this work area, else it return .T.
Description
BROWSE() is a general purpose database browser, without any thinking you can browse a file using the following keys:
Key Meaning --------------- -------------------------------------------- Left Move one column to the left (previous field) Right Move one column to the right (next field) Up Move up one row (previous record) Down Move down one row (next record) Page-Up Move to the previous screen Page-Down Move to the next screen Ctrl Page-Up Move to the top of the file Ctrl Page-Down Move to the end of the file Home Move to the leftmost visible column End Move to the rightmost visible column Ctrl Left Pan one column to the left Ctrl Right Pan one column to the right Ctrl Home Move to the leftmost column Ctrl End Move to the rightmost column Esc Terminate BROWSE()
On top of the screen you see a status line with the following indication:
Record ###/### Current record number / Total number of records. <none> There are no records, the file is empty. <new> You are in append mode at the bottom of file. <Deleted> Current record is deleted. <bof> You are at the top of file.
You should pass whole four valid coordinate, if less than four parameters are passed to BROWSE() the coordinate are default to: 1, 0, MAXROW(), MAXCOL().
Examples
// this one shows you how to browse around USE Around Browse()
Compliance
Clipper
Files
Library is rtl
Seealso
DBEDIT()*, TBrowse class
SP_SGETMANY
SGETMANY() Short: ------ SGETMANY() Virtual (scrolling) gets in a popup box Returns: -------- <lSave> => False if ESC pressed, true otherwise Syntax: ------- SGETMANY(aGets,aDesc,nTop,nLeft,nBottom,nRight,[cTitle],[cFoot],[nPadding]) Description: ------------ READs a series of GETs in a popup box, with the ability to scroll the GETs up/down when there are more GETs than fit in the box. <aGets> is an array of get objects. There are two ways to create this: 1. Use GETNEW() (the Clipper function) to create each individual get object. Get row and column do not matter - they will be adjusted. GET postblock and preblock (valid and when) may be assigned as normal. As each new GET object is created, add it to an array. Pass this array as <aGets>. 2. Use the normal @row,col GET... commands, but to a location off the screen - otherwise the gets will DISPLAY as you are assigning them. @MAXROW()+1,MAXCOL()+1 GET... works for me. Using @...GET automatically places new get objects in the global array GETLIST. Pass GETLIST as <aGets>. <aDesc> this is an array of descriptions for each get. (the SAY portion). These will be displayed to the left of the get. <nTop,nLeft,nBottom,nRight> are the dimensions of the popup box. The Editing area will be the inside dimensions of this box. Make sure there's room! [cTitle] is a string to be used for the title. Displayed at <nTop>,<nLeft>+1 [cFoot] is now ignored. This parameter used to be the footer. It is now just a placeholder for downward compatibility. [nPadding] is for the number of spaces of padding between the box frame and the editing area. The default is 0, which places the editing area at nTop+1,nLeft+1,nBottom-1,nRight-1. A [nPadding] of 1 would place the editing area at nTop+2,nLeft+2,nBottom-2,nRight-2 etc. Examples: --------- local i local aDesc := {} local aGets USE CUSTOMER aGets := dbf2array() for i = 1 to len(aGets) @maxrow()+1,maxcol()+1 get aGets[i] aadd(aDesc,field(i)) next SGETMANY(getlist,aDesc,10,10,17,50,; "Editing","ESC quits, F10 saves",1) NOTES: ------- Do not pass a 0 length string as a GET Source: ------- S_GETMANY.PRG
C5_MAXCOL
MAXCOL() Determine the maximum visible screen column ------------------------------------------------------------------------------ Syntax MAXCOL() --> nColumn Returns MAXCOL() returns the column number of the rightmost visible column for display purposes. Description MAXCOL() is a screen function that determines the maximum visible column of the screen. Row and column numbers start at zero in Clipper. If you use a C or other extended function to set the video mode, use the SETMODE() function so your Clipper application returns the correct value for MAXCOL(). Examples . This example uses MAXROW() and MAXCOL() to determine the area in which to draw a box, and then executes DBEDIT() within the box region: CLS @ 0, 0 TO MAXROW(), MAXCOL() DOUBLE DBEDIT(1, 1, MAXROW() + 1, MAXCOL() - 1) Files Library is CLIPPER.LIB.
See Also: COL() MAXROW() ROW()
Tools – Extended Drivers
Introduction Extended Drivers CGA40() Switches to 40-column mode (color or monochrome) CGA80() Switches to 80-column mode (color or monochrome) DSETKBIOS() Turns the extended keyboard mode on or off through BIOS DSETNOLINE() Ignores the next line feed sent to the screen DSETQFILE() Creates a protocol file when the program ends normally DSETTYPE() Determines the size of the keyboard buffer (SET TYPEAHEAD TO) DSETWINDEB() This function is no longer supported DSETWINDOW() Reroutes external functions and programs to a window EGA43() Switches to the 43-line EGA mode FIRSTCOL() Sets the first visible column of a virtual screen FIRSTROW() Sets the first visible line of a virtual screen GETBOXGROW() Gets the time delay with which boxes are opened GETCURSOR()* Determines the setting for the cursor form GETKXLAT() Determines the current key code table GETKXTAB() Retrieves the entire key code table GETLINES() Determines number of lines after which screen display pauses GETMODE() Uses the current screen mode as a function name GETPAGE() Determines the current screen page GETPBIOS() Determines if printing is through DOS or the BIOS GETPXLAT() Retrieves the current printer table GETSCRMODE() Determines the number of the active video mode GETTAB() Retrieves tab values for CA-Clipper screen output INKEYTRAP() Behaves like INKEY() with support for key traps INPUTMODE() Determines previously active or currently active input mode KEYREAD() Reads already processed CA-Clipper keyboard buffer input KEYSEND() Simulates Clipper keyboard buffer input MAXCOL() Extends the Clipper MAXCOL() function MAXPAGE() Determines the number of available screen pages MAXROW() Extends the Clipper MAXROW() function MONOCHROME() Switches to the monochrome mode PAGECOPY() Copies one screen page to another PRINTERROR() Returns the error code for the last printer output SETBELL() Sets the tone frequency and duration for CHR(7) SETBOXGROW() Opens boxes with a time delay SETCURSOR() Sets the cursor form SETKXLAT() Redefines key codes or lock keys SETKXTAB() Installs key tables SETLINES() Determines number of lines after which screen display pauses SETMAXCOL() Sets the number of columns for a virtual screen SETMAXROW() Sets the number of lines for a virtual screen SETPAGE() Selects a new screen page SETPBIOS() Redirects print output to BIOS or DOS, and establishes timeout SETPXLAT() Establishes translation tables for printer output SETQNAME() Changes the file and path name for the QUIT file SETSCRMODE() Establishes a new video mode SETTAB() Sets the tab widths for CA-Clipper screen outputs TRAPANYKEY() Calls a procedure with any keyboard input TRAPINPUT() Allows supervision of CA-Clipper input commands TRAPSHIFT() Calls a procedure that depends on switching keys VGA28() Switches to 28-line VGA mode VGA50() Switches to 50-line VGA mode.