Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>
TAdvStringGrid
Set a different XY offset for different cells in the grid
Set a different XY offset for different cells in the grid
You can change the X,Y offset dynamically for each cell via the OnGetCellColor event and call from there grid.UpdateXYOffset.
Example to set an XY offset different from the floating footer configured to display the last row of the grid:
procedure TForm1.AdvStringGrid1GetCellColor(Sender: TObject; ARow, ACol: Integer; AState: TGridDrawState; ABrush: TBrush; AFont: TFont); begin if arow = advstringgrid1.RowCount - 1 then advstringgrid1.UpdateXYOffset(0,-2) else advstringgrid1.UpdateXYOffset(2,2); end;