Grid Control

See Also2NSBYVN         Properties1O1BADM        EventsKFZ558            MethodsKG6O4X


A grid control displays a series of rows and columns.  The intersection of a row and column is a cell.  You can read and set the contents of each cell programmatically.


You can put either text or a picture in any cell of a grid.

The RowL43H93 and ColL43H93 properties specify the current cell in a grid.  You can specify the current cell in code, or the user can change it at run time using the mouse or the arrow keys.  The Text14TWSRU property references the contents of the current cell.

If a cell's text is too long to be displayed in the cell, the text wraps to the next line within the same cell.  To display the wrapped text, you must increase the cell's column width (ColWidth1ABUEFO property) or row height (RowHeight5NQLDX property).

Use the Cols and Rows properties to determine the number of columns and rows in a grid control.  A grid cannot have more than 2000 rows, or 400 columns.

When a new element of a control array is loaded at run time, the new element does not inherit the original control's run-time properties.


Note   Before you can use a grid control in your application, you must add GRID.VBX to your project using the Add File command on the File menucmdFileMenu.  To automatically include GRID.VBX in new projects, put it in an AUTOLOAD.MAK file.  When distributing your application, you should install the GRID.VBX file in the user's Microsoft Windows \SYSTEM subdirectory.


See Also

Programmer's Guide:

Chapter 13, "Using the Grid Control"


BackColor1W9T6JQ              FontNameB3RMO3               RowHeight5NQLDX

BorderStyle43RNRL            FontSizeB3WV13                 Rows1WFQF0

CellSelectedV083D7           FontStrikethru5NZYQSD         ScrollBars1V1TUSJ

Clip1GRK6IK                        FontUnderline5NZYQSD         SelEndCol1Q7SBUK

ColL43H93                         ForeColor1W9T6JQ               SelEndRow1Q7SBUK

ColAlignmentV9JFN3          GridLines28K2RYP                SelStartCol1Q7SBUK

Cols1WFQF0                       HeightL14VJZ                    SelStartRow1Q7SBUK

ColWidth1ABUEFO                HelpContextID764PDR        TabIndexH38QPT

DragIcon3G3M07O                HighLight1EMIDBQ                TabStop81MAWZ

DragModeS9LGP1              hWnd1CIW7KQ                     Tag6GI6KP

Enabled3XD4FN                  Index3MKW18P                      Text14TWSRU

FillStyle2N3S7OE                  Left1CIZPD6                        Top1CIZPD6

FixedAlignment1NM2GHO       LeftColTESE3X                   TopRow1247H93

FixedCols7K5Y9NL               Name2016V9P                     Visible32KNZA4

FixedRows7K5Y9NL             Parent17GLLBF                    WidthL14VJZ

FontBold5NZYQSD                 Picture4GBE5Q                  

FontItalic5NZYQSD                RowL43H93                      




Click68UQAKP                      KeyDownRI06O6                MouseMove1D70SW5

DblClick2UG5QK1                 KeyPressPFFDUA               MouseUpD0VNMJ

DragDrop1EBOJGL               KeyUpRI06O6                    RowColChange1P1L2J7

DragOver2TUGMAC               LostFocus2ZXQDAR              SelChange41BQVWT

GotFocus32EWUCC               MouseDownD0VNMJ




AddItem2BIX3OB                 RemoveItemM867OS

Drag2IEV8PA                      SetFocus4AVBOY

Move103G76J                      ZOrder1YQ29TM