| AddColumn |
(required) add a column to the list
parameters: - sText, this is the cell text - iWidth, the fixed width of the column, -1& for automatic - iAlign, the alignment of the cell text - vKey, the key of the column; you can use a key when referring to a certain column instead of using an index - bResizable, is the column resizable by the user? - iHeaderAlign, the alignment of the header text - bSortable, is the column data sortable? the list uses a high performance "Quick Insertion Sort" algorithm (thanks Nigel) - bSortWithCustomEvent, permits you to sort data in a custom way. Simply implement the "SortCompareRows" event and return true if element in Row1 is greater than element in Row2. In this case the list uses another good "Quick Sort" algorithm but it is able to maintain rows congruent. - bRightToLeft, permits you to display a RTL string into the column - iType, represents the data type; if you use a data type different from "string" you need to fill cells using the "CellValue" and "CurrCellValue" methods instead of using the "AddRow" method. - AllowEmptyNumbers, permits you to add empty cells in a Numeric column |
| AddRow |
adds a text row to the list (use vbTab to separe column data (optional)); for adding an empty row simply omit parameters |
| AllowMultiLineText |
Permits you to use multiline text in grid cells (False by default):
- if False the grid doesn't permit multi-line text; vbCrLf is ignored and the scroll unit is a row
- if True the grid permits multi-line text; the scroll unit is a pixel as every row can have different height than other rows. In this mode the grid is slower than before. If the column has a fixed width, the text is word-wrapped to fit the cell size; if the column doesn't have a fixed size the text word-wraps only when a Carriage Return is encountered. |
| BeginUpdate / EndUpdate |
permits you to start a long-time update on the control (for example by adding 1000 elements) without sending out many and many events. So it is fast! |
| CellBackColor / CellForeColor / CellValue |
change properties of a specified cell in a specified row |
| CellBorderColor |
the color among cells |
| Clear |
clear the grid |
| ColAlign / ColResizable / ColText / ColWidth |
changes header properties |
| ColExists |
does the specified column exists? |
| ColKey |
returns the key associated with a certain column index |
| ColRightToLeft |
gets/sets if the column data has a RTL layout |
| ColSortWithCustomEvent |
gets/sets if the column data is sorted using a custom method |
| ColSortable |
gets/sets if the column is sortable |
| Cols |
returns the number of columns |
| CountSelected |
returns the number of selected lines |
| CurrCellBackColor / CurrCellForeColor / CurrCellValue |
changes properties of a specified cell in the current row |
| CurrCellTag / CellTag |
You can associate to every cell an hidden information that you can use as you want |
| FocusSelectedRow |
focus the selected row |
| FormatNumber |
returns a string formatted as a number so you can use a text column for displaying formatted numbers.
parameters: - sNumber, is the number in string format (Cstr(<number>)) - sDecSep, is the decimal separator to use; this char depends on regional settings of the system; leave blank for auto. - sValSep, is the thousand separator; leave blank for auto - fixInt, is the number of fixed integers to use; give -1& for automatic - fixDec, is the number of fixed decimals to use; give -1& for automatic - bSgn, sign flag; if False the sign will be shown only if negative (-); if True the sign will be always displayed - bAutoDecSep, permits the grid to use an automatic decimal separator if you omit it - bAutoValSep, permits the grid to use an automatic thousand separator if you omit it |
| GetCellAbsRect |
given the column and row index returns the rect of the pointed cell.
Note: the returned coords are NOT relative to the visible viewport (VSCROLL and HSCROLL values are not treated) |
| GetCellPicture / SetCellPicture |
get/set picture properties for cells |
| GetCellRect |
given the column and row index returns the rect of the pointed cell.
Note: the returned coords are relative to the visible viewport (VSCROLL and HSCROLL values are automatically treated) |
| GetCellRectByCoords |
given the X and Y coords returns the rectangle of the pointed cell
Note: the returned coords are relative to the visible viewport (so you can pass the coordinates directly from the MouseMove, MouseDown and MouseUp events without changes) |
| GetColByAbsX |
returns the column number by the absolute X coordinate (the X coordinate with the HScroll_Value).
If the X coordinate passed to this methid is not into any cell the result is -1&
Note: the "HScroll_Value" is NOT automatically added to the X coordinate. |
| GetColByX |
returns the column number by the relative X coordinate (the X coordinate without the HScroll_Value as obtained by the MouseMove, MouseDown and MouseUp events).
If the X coordinate passed to this methid is not into any cell the result is -1&
Note: the "HScroll_Value" is automatically added to the X coordinate when you pass it to this method (so the X parameter refers only to the visible viewport). |
| GetColX |
return the absolute X coordinate by the col number (the X coordinate + the HScroll_Value). |
| GetRowByAbsY |
returns the row number by the absolute Y coordinate (the Y coordinate with the VScroll_Value).
If the Y coordinate passed to this methid is not into any cell the result is -1&
Note: the "VScroll_Value" is NOT automatically added to the Y coordinate. |
| GetRowByY |
returns the row number by the relative Y coordinate (the Y coordinate without the VScroll_Value as obtained by the MouseMove, MouseDown and MouseUp events).
If the Y coordinate passed to this methid is not into any cell the result is -1&
Note: the "VScroll_Value" is automatically added to the Y coordinate when you pass it to this method (so the Y parameter refers only to the visible viewport). |
| GetRowY |
return the absolute Y coordinate by the row number (the Y coordinate + the VScroll_Value). |
| GetVisibleRows |
returns the number of visible rows |
| HScroll_Value / HScroll_Max |
horizontall scrollbar management |
| HeaderBackColor / HeaderForeColor |
header colors |
| IsHeaderCoord |
returns true if the passed Y coord is part of the header |
| IsRowCompletelyVisible |
returns true if the given row is visible |
| MinRowHeight |
the minimum height of every row |
| MultiSelect |
permits you to select multiple rows on the grid. Use SHIFT or CTRL + Mouse or Arrow Keys. Check the status using the RowSel method |
| RemoveColumn / RemoveRow |
removes column/row |
| Row |
gets/sets the current row index |
| RowSel |
returns true if a line is selected (when the control has the MultiSelect property set to true) |
| Rows |
gets/sets the number of rows in the grid |
| ScrollOnMouseWheel |
should the control scroll vertically when a mousewheel event occurs? |
| SelBackColor / SelForeColor |
colors of the selector |
| SelectAll, SelectRange |
selected all, none or a range of rows in the grid (MultiSelect must be true) |
| SetColFormat |
sets the formatting options when displaying a Numeric column in grid. Check parameters in the "FormatNumber" method documentation. |
| SortByColum |
invokes the sort on a specified column |
| VScroll_Value / VScroll_Max |
vertical scrollbar management |
| ViewPortWidth / ViewPortHeight |
size of the visible area (without the scrollbars) |