Link to home
Start Free TrialLog in
Avatar of warrencc
warrencc

asked on

FlexGrid

Can someone tell me how to Autosize the Row height in a Flex Grid.  I have a Memo field that will contain a large amount of text and need to be able to read it all.  Either Autosize the row or provide some type of scrolling ability so as to be able to view ALL the data in the field
ASKER CERTIFIED SOLUTION
Avatar of clifABB
clifABB

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of warrencc
warrencc

ASKER

If I am using column 6 all the time and need this capability in all rows how should I change the (nRow and nCol).  Sorry for needing the detailed explaination.....
Create the following subroutine in the form which has the flexgrid:

Private Sub FixFlex()
  Dim nRow As Integer

  lblCellText.Width = MSFlexGrid1.ColWidth(6)

  For nRow = 1 to MSFlexGrid1.Rows - 1
    lblCellText.Caption = MSFlexGrid1.TextMatrix(nRow, 6)
    MSFlexGrid1.RowHeight(nRow) = lblCellText.Height + 240
  Next nRow
End Sub

Now call FixFlex right after adding data to the FlexGrid or after refreshing your data control.