Is it a known issue that after clearing a MSFlexGrid control using the .Clear method, formatting does not display properly?
I populate the grid using the following method:
Once I call the clear method, and call the same code as above, it inserts the data fine, but the formatting does not take effect, (cellfontbold, cellbackcolor).Code:msFlxGrd.AddItem (sRecord & vbTab & CStr(sValue)) If bHeader Then 'This is a header, change the background colour. msFlxGrd.Redraw = False msFlxGrd.MergeCells = flexMergeRestrictRows msFlxGrd.row = msFlxGrd.Rows - 1 msFlxGrd.MergeRow(msFlxGrd.Rows - 1) = True msFlxGrd.CellBackColor = &HDBD8D7 msFlxGrd.CellFontBold = True msFlxGrd.Redraw = True ' msFlxGrd.TopRow = msFlxGrd.Rows - 1 end if
Any ideas?
Here is my clear method:
Ive been playing around with the refresh/redraw, but it makes not difference.Code:msFlxGrd.Redraw = False msFlxGrd.clear msFlxGrd.Rows = 0 msFlxGrd.Redraw = True msFlxGrd.Refresh
Thanks,
Luke




Reply With Quote