Hi there,
I am new to the TreeView
I could not find a way to do a simple thing, color the column background.
I want that every cell in that column to be the same background color.
Using Tokyo and FMX
Thanks
Hi,
You can turn off UseDefaultAppearance on column level and then set the Fill color to color the column
I have tried:
TreeViewMetas.BeginUpdate;
TreeViewMetas.Columns[7].UseDefaultAppearance := false;
TreeViewMetas.Columns[7].Fill.Color := TAlphaColorRec.Steelblue;
and made no difference.
I am not using the AdapttoStyle.
I want that the entire background color of that column to be changed
Hi,
With a default TTMSFMXTreeView on the form and the following code, the first column shows in red
TMSFMXTreeView1.BeginUpdate;
TMSFMXTreeView1.Columns[0].UseDefaultAppearance := False;
TMSFMXTreeView1.Columns[0].Fill.Color := TAlphaColorRec.Red;
TMSFMXTreeView1.Columns[0].Fill.Kind := TBrushKind.Solid;
TMSFMXTreeView1.EndUpdate;
it did not work.
I have tried :
procedure TViewStandardExploradorMetasVendedores.TreeViewMetasBeforeDrawColumnText(Sender: TObject; ACanvas: TCanvas; ARect: TRectF;
AColumn: Integer; AKind: TTMSFMXTreeViewCacheItemKind; AText: string; var AAllow: Boolean);
begin
inherited;
case AColumn of
7 : begin
ACanvas.Fill.Color := TAlphaColorRec.Steelblue;
ACanvas.Fill.Kind := TBrushKind.Solid;
AAllow := true;
end;
end;
end;
But this only change the header text color, not the background.
I find extremelly dificult to do simple things.
Setting the column to a FILL color on IDE does not work either.
I have not changed much things on the default.