|
|
Visits:
2522
(33 on line)
|
Last Update: Dec 5, 2003
|
|
|
|
| | |
| Description Inheritance Example Properties Methods |
| |
| Description |
The TGrid5 Object is a wrapper object allowing you to more easily use the APL+Win APLGrid object TGrid5 displays a grid with a nice default font and row height and corrects a few problems existing with the standard APLGrid object
See also: TDundasGrid5 TExcel5 TFlexGrid5 TFOne5 TFormOne5 TSpread5 |
| Description Inheritance Example Properties Methods |
| |
| Inheritance |
Inherits from: TObject5 |
| Description Inheritance Example Properties Methods |
| |
| Example |
| |
 |
| |
The above example was generated by the following APL+Win Objects code: |
'ff'Świ'*Create' 'TForm5'('*caption' 'TGrid5 Example')('ontop'1)('*size'350 550)'Show' 'SessionFocus'
'ff'Świ'*.grid.Create' 'TGrid5'('wherelc'0 0 '>>' '>>')('attach'1 2 3 4)
rows„cols„30
'ff'Świ'*.grid.xRows'rows
'ff'Świ'*.grid.xCols'cols
'ff'Świ'*.grid.Redraw'
'ff'Świ'*.grid.HeadRows'2
'ff'Świ'*.grid.HeadCols'2
'ff'Świ'*.grid.RowSize'Ż2 10
'ff'Świ'*.grid.ColSize'Ż2 10
'ff'Świ'*.grid.Redraw'
'ff'Świ'*.grid.FixedRows'1
'ff'Świ'*.grid.FixedCols'1
'ff'Świ'*.grid.Redraw'
r„•¨Ľrows
c„•¨Ľcols
text„('(',¨r)°.,(',',¨c),¨')'
text„(' ','R',¨r),('C',¨c)®text
'ff'Świ'*.grid.Text'(Ż1,Ľrows)(Ż1,Ľcols)text
'ff'Świ'*.grid.Redraw'
images„1 2 3 4°.+4×3 2˝0 1 2 3 4 5
'ff'Świ'*.grid.Image'(Ľ4)(5 7 9)(3 5)images
'ff'Świ'*.grid.ImageFile'(('oo5'Świ'installdir'),'grid66.bmp')
'ff'Świ'*.grid.Redraw'
'ff'Świ'*.grid.onCellMouseDown' "Śwself Śwevent'('Śwarg')'"
'ff'Świ'*.grid.onCellMouseUp' "Śwself Śwevent'('Śwarg')'"
'ff'Świ'*.grid.onCellClick' "Śwself Śwevent'('Śwarg')'"
'ff'Świ'*.grid.onCellChange' "Śwself Śwevent'('Śwarg')'"
'ff'Świ'*.grid.onViewChange' "Śwself Śwevent'('Śwarg')'"
'ff'Świ'*.grid.onEditStart' "Śwself Śwevent'('Śwarg')'"
'ff'Świ'*.grid.onEditEnd' "Śwself Śwevent'('Śwarg')'"
'ff'Świ'*.grid.onKeyMove' "Śwself Śwevent'('Śwarg')'"
'ff'Świ'Show'
Śerase'ff gg images rows cols r c text'
|
| |
| Description Inheritance Example Properties Methods |
| |
| Properties |
| |
|
| class |
Description: Return current object class
Syntax: class„'obj' Świ 'class' |
| coltitles |
Description: Get or Set the column titles for all Grid columns (read-only for now)
Syntax: {nestedmatrix„'} 'obj' Świ 'coltitles' {nestedmatrix}
nestedmatrix: an APL matrix of character vectors
Example:
'ff.grid' Świ 'coltitles' |
| content |
Description: Get or Set the complete content of the Grid (read-only for now)
Syntax: {nestedmatrix„'} 'obj' Świ 'content' {nestedmatrix}
nestedmatrix: an APL nested matrix
Example:
'ff.grid' Świ 'content' |
| edithwnd |
Description: Returns the grid Edit control handle (Read-Only)
Syntax: edithwnd„'obj' Świ 'edithwnd'
Example:
'ff.grid' Świ 'edithwnd' |
| edittext |
Description: Returns the grid Edit control text (Read-Only)
Syntax: text„'obj' Świ 'edittext'
Example:
'ff.grid' Świ 'edittext' |
| help |
Example:
0 0˝'ff' Świ '*Create' 'TForm5' ('*caption' 'TGrid5 Example') ('ontop'1) ('*size'350 550) 'Show' 'SessionFocus'
0 0˝'ff' Świ '*.grid.Create' 'TGrid5' ('wherelc'0 0 '>>' '>>') ('attach'1 2 3 4)
rows„cols„30
'ff' Świ '*.grid.xRows'rows
'ff' Świ '*.grid.xCols'cols
'ff' Świ '*.grid.Redraw'
'ff' Świ '*.grid.HeadRows'2
'ff' Świ '*.grid.HeadCols'2
'ff' Świ '*.grid.RowSize'Ż2 10
'ff' Świ '*.grid.ColSize'Ż2 10
'ff' Świ '*.grid.Redraw'
'ff' Świ '*.grid.FixedRows'1
'ff' Świ '*.grid.FixedCols'1
'ff' Świ '*.grid.Redraw'
r„•¨Ľrows
c„•¨Ľcols
text„(' (',¨r)°.,(',',¨c),¨') '
text„(' ','R',¨r),('C',¨c)®text
'ff' Świ '*.grid.Text' (Ż1,Ľrows) (Ż1,Ľcols)text
'ff' Świ '*.grid.Redraw'
images„1 2 3 4°.+4×3 2˝0 1 2 3 4 5
'ff' Świ '*.grid.Image' (Ľ4) (5 7 9) (3 5)images
'ff' Świ '*.grid.ImageFile' (('oo5' Świ 'installdir'),'grid66.bmp')
'ff' Świ '*.grid.Redraw'
'ff' Świ '*.grid.onCellMouseDown' "Śwself Śwevent' (' Śwarg') '"
'ff' Świ '*.grid.onCellMouseUp' "Śwself Śwevent' (' Śwarg') '"
'ff' Świ '*.grid.onCellClick' "Śwself Śwevent' (' Śwarg') '"
'ff' Świ '*.grid.onCellChange' "Śwself Śwevent' (' Śwarg') '"
'ff' Świ '*.grid.onViewChange' "Śwself Śwevent' (' Śwarg') '"
'ff' Świ '*.grid.onEditStart' "Śwself Śwevent' (' Śwarg') '"
'ff' Świ '*.grid.onEditEnd' "Śwself Śwevent' (' Śwarg') '"
'ff' Świ '*.grid.onKeyMove' "Śwself Śwevent' (' Śwarg') '"
'ff' Świ 'Show'
Śerase'ff gg images rows cols r c text' |
| hwnd |
Description: Returns the grid handle (Read-Only)
Syntax: hwnd„'obj' Świ 'hwnd'
Example:
'ff.grid' Świ 'hwnd' |
| modified |
Description: Workaround for the non effective modified property of the Grid object
Syntax: 'obj' Świ 'modified' {boolean}
boolean: 0 or 1=control has been modified
Example:
'ff.grid' Świ 'modified' |
| nosort |
Description: Indicates whether clics on column headers sorts the grid or not
Syntax: {boolean„'} 'obj' Świ 'nosort' {boolean}
boolean: 1=clics on column headers sort the grid, 0=they don't
Example:
'ff.grid' Świ 'nosort'1 |
| spy |
Description: Start/end spying events on the TGrid5 object
Syntax: 'obj' Świ 'spy' {boolean}
boolean: 1=spy 0=no spy
Example:
'ff.grid' Świ 'spy'1 |
| text |
Description: Installs a scalar, vector or matrix at a given location in the Grid and redraws
Syntax: cols„'obj' Świ 'text'row col values
row: row where to start inserting text
col: column where to start inserting text
values: scalar, vector and/or matrix
cols: the changed column numbers
Example:
'ff.grid' Świ 'text'2 2(3 4˝Ľ12) |
| version |
Description: Returns the APL.Grid version and file name (read-only property)
Syntax: versionfile„'obj' Świ 'version'
versionfile: 2-element nested vector:
[1]=4-element integer vector containing the Grid version
[2]=registered APLGrid.DLL file name
See also: the TObject5 <GridVersion> method
Example:
'ff.ss' Świ 'version'
.…--------------------------------.
|.…-------..…--------------------.|
||4 0 17 0||c:\aplwin\aplgrid.dll||
|'~-------''---------------------'|
'ą--------------------------------' |
|
| Description Inheritance Example Properties Methods |
| |
| Methods |
| |
|
| AutoFit |
Description: Adapts column widths so that they best fit column contents and titles
Syntax: 'obj' Świ 'AutoFit'
Example:
'ff.grid' Świ 'AutoFit' |
| Clear |
Description: Clears the Grid content for specified rows and columns
Syntax: 'obj' Świ 'Clear'rows cols
rows: a scalar or vector of row numbers or 0 for all rows
cols: a scalar or vector of column numbers or 0 for all columns
Example:
'ff.grid' Świ 'Clear' |
| ColorSelection |
Description: Changes the background color of currently selected cells
Syntax: 'obj' Świ 'ColorSelection' {color}
Note: this method is used by the TEditGrid5 object
Example:
'ff.grid' Świ 'ColorSelection'255 0 255 |
 |
| Event |
Description: Reports about the event which just occurred
Syntax: 'obj' Świ 'Event'
Example:
'ff.grid' Świ 'Event' |
| New |
Description: Create a new instance of TGrid5
Example:
'obj' Świ '*Create' 'TGrid5'
|
 |
| Print |
Description: Prints the content of the entire grid
Syntax: 'obj' Świ 'Print' {printername}
printername: the name of an available printer (as returned by: ('#' Świ 'Printers')[;1])
Example:
'ff.grid' Świ 'Print'
'ff.grid' Świ 'Print' 'hp officejet 7100 series' |
|
| Description Inheritance Example Properties Methods |
| |
|