Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   MSHF Flexible Grid (http://www.go4expert.com/forums/mshf-flexible-grid-t13285/)

pardeep3dec 26Aug2008 16:13

MSHF Flexible Grid
 
Hi Friends,
I am using flexible grid for showing recordset . My problem is that when text length goes greater than flexible grid cell/grid then it not adjusted according to text.

Please help. I set word wrap property True but it is not work.

telkomek 19May2011 16:47

Re: MSHF Flexible Grid
 
Code:

Public Function AutoFitFlexGrid(ByVal flx As MSHFlexGrid, frm As Form)
Dim r As Long
Dim C As Long
Dim cell_wid As Single
Dim col_wid As Single


    For C = 0 To flx.Cols - 1
        col_wid = 0
        For r = 0 To flx.Rows - 1
            cell_wid = frm.TextWidth(flx.TextMatrix(r, C))
            If col_wid < cell_wid Then col_wid = cell_wid
        Next r
        flx.ColWidth(C) = col_wid + 150
    Next C
End Function

may help your problem...


All times are GMT +5.5. The time now is 12:58.