I've been pulling my hair out trying to find out why some of the cells in my TMSFMXGrid keep switching to bold font. I finally narrowed it down to a call to TMSFMXGrid.SetProgressBarValue(int).
Whenever a row is selected in the Grid (in smDisjunctRow mode) and I call TMSFMXGrid.SetProgressBarValue(int) for the first column in this row, the text in the second column of this row will switch to bold. I created a small test project to make sure it is not something in my code.
It is basically just a FireMonkey project with a TButton and a TTMSFMXGrid on the main form. I then created an OnShow event to configure the Grid and an OnClick event on the Button to increment the ProgressBar value.
Here is the source code of the events:
void __fastcall TForm1::FormShow(TObject *Sender)
{
Grid->RowCount = 10;
Grid->FixedColumns = 0;
Grid->FixedShowSelection = false;
Grid->Options->Bands->Enabled = true;
Grid->Options->Editing->Enabled = false;
Grid->SelectionMode = smDisjunctRow;
Grid->Options->Mouse->WheelScrollKeepSelection = true;
Grid->Options->Mouse->ColumnAutoSizeOnDblClick = true;
Grid->Options->Mouse->FixedColumnSizing = true;
Grid->Options->Borders->CellBorders = bNone;
Grid->Options->Borders->FixedCellBorders = bVertical;
Grid->ColumnCount = 6;
Grid->Cells[0][0] = "A";
Grid->Cells[1][0] = "B";
Grid->Cells[2][0] = "C";
Grid->Cells[3][0] = "D";
Grid->Cells[4][0] = "E";
Grid->Cells[5][0] = "F";
for (int i=1; i<Grid->RowCount; i++)
{
if (!Grid->IsProgressBar(0, i))
Grid->AddProgressBar(0, i, 1);
Grid->Cells[1] = "B:" + IntToStr(i);
Grid->Cells[2] = "C:" + IntToStr(i);
Grid->Cells[3] = "D:" + IntToStr(i);
Grid->Cells[4] = "E:" + IntToStr(i);
Grid->Cells[5] = "F:" + IntToStr(i);
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Grid->SetProgressBarValue(0, 1, Grid->GetProgressBarValue(0, 1) + 1);
}
//---------------------------------------------------------------------------
Can somebody confirm this is a bug in the TMSFMXGrid code and not something I'm doing wrong?