MSFlexGrid Column resizer
Hey guys out there, I make this function as i was seeking some good and easy way to make my FlexGrid look better.......I have not copied it, but if any other did the same then do tell me i will try to modify it....... and please feel free to use it and kindely also vote for me........Thanks
AI
AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Source Code
Public Function AlignGridData(FlexGrid As MSFlexGrid)
'THIS FUNCTION IS USED FOR MAKING ENOUGH SPACE FOR TEXT SO THAT THE
'TEXT HAVING MAXIMUM WIDHT CAN BE EASILY BE READ IN FLEXGRID
Dim ObjFrm As Form
Dim MaxCol As String
Dim J, I As Integer
For J = 1 To FlexGrid.Cols - 1
MaxCol = ""
For I = 0 To FlexGrid.Rows - 2
If I = 0 Then
FlexGrid.Row = 0
FlexGrid.Col = J
' FlexGrid.CellFontBold = True
End If
If FlexGrid.Parent.TextWidth(FlexGrid.TextMatrix(I, J)) > FlexGrid.Parent.TextWidth(MaxCol) Then MaxCol = FlexGrid.TextMatrix(I, J)
Next I
FlexGrid.ColWidth(J) = FlexGrid.Parent.TextWidth(MaxCol) * 1.6
Next J
End Function
Original Comments (3)
Recovered from Wayback Machine