Jump to content


dougwinsby

Member Since 23 Apr 2019
Offline Last Active Apr 28 2023 02:17 AM
-----

Posts I've Made

In Topic: NextGrid6 string processing, NextVirtualGrid6 and a few questions and bugs

25 June 2019 - 04:03 AM

For those trying to have rows automatically adjust to the height necessary to show all wrapped text in a virtual grid, here are the steps:

 

1. Set TNxTextColumn6.WrapKind := wkWordWrap; (in Object inspector or code)

2. Set TNxTextColumn6.Resizeable := False;  (in Object inspector, Columns Editor or code)

3. Create an OnMeasureRowHeight event on TNextVirtualGrid6 as shown below:

procedure TForm6.NextVirtualGrid61MeasureRowHeight(Sender: TObject; Index: Integer; var RowHeight: Integer);
begin
  RowHeight := NextVirtualGrid61.BestFitRow(Index);
end;