TXmsDBGrid TXmsDBGrid is a descendent of TDBGrid that addresses three major failings of the original: - Shift key selection of contiguous multiple rows - Resize of columns to fit within the available grid space, i.e. so you never have horizontal scrollbar - Adding MouseUp and MouseDown events. Both are optional and shift key multiple selection uses the standard dataset tbookmarks rather than a proprietary selection method so adding Shift key support is as easy as swapping your current DBGrid for TXmsDBGrid. Column Resize uses a ResizeToFit method (usually put in the onresize event). It will reduce or increases the size of a specified column so all columns match the exact width of the grid. You specify which column is resized and what is its minimum and maximum widths. TXmsDBGrid Properties ResizeCol (default 0): This is the column whose width should be altered when calling the ResizeToFit method. ResizeColMin (default 20): This is the minimum permissible width of the column above when the ResizeToFit method is called. If the minimum width is reached then TXmsDBGrid will not succeed in dismissing the Horizontal scrollbar ResizeColMax (default -1): This is the maximum permissible width of the column above when the ResizeToFit method is called. If the maximum width is reached then the columns then there will be a blank area at the right of the columns. The default of -1 means there is no maximum width of the column. SelectOnMove (default False): Normally selecting a file with the keyboard (e.g. Up and Down keys) does not have the same effect as clicking it with the keyboard. That is, the former does not actually select the item (i.e. not a Tbookmarks selected file). If you enable this option then clicking a row with the mouse or moving to it has the same effect it becomes the selectedrows of the dataset. TotalColWidths: This value is the total width of column in the DBGrid, you might use this for setting the width of the DBGrid to the columns that it contains. currentrow: This is the currently selected row, 0 based, i.e. 0 indicates the first row, 1 is the second row etc. currentcol: This is the currently selected column, 0 based, i.e. 0 indicates the first column, 1 is the second column etc. TXmsDBGrid Methods ResizeToFit: This resizes the column set in ResizeCol so that the total columns match the width of the available space in the DBGrid. I.e. so there is no horizontal bar and no blank space. It is bound by ResizeColMax and ResizeColMin. SelectAll: If dgmultiselect is set in options then calling this method will set all selected rows in the DBGrid ResetAll: If dgmultiselect is set in options then calling this method will clear all selected rows in the DBGrid TXmsDBGrid Events OnMouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); OnMouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); Xequte Software www.xequte.com xequte@usa.net