JusJJ 0 Posted May 23, 2023 Is it somehow possible to change the background color and remove borders of the (string)grid in FMX? I would like to align the data in a 4 x 10 grid but only keep the text visible and hide background and borders. Share this post Link to post
programmerdelphi2k 237 Posted May 23, 2023 (edited) @JusJJ I think that easy way would be: right-click on StringGrid and "Edit Custom Style..." option -> to create a StyleBook customized into it, you need just access 2 properties: StyleGrid1Style1 --> and change: "background -> Visible=false" and "linefill -> Brush.Kind = none" in StringGrid options, uncheck "Show Header" Edited May 23, 2023 by programmerdelphi2k Share this post Link to post
JusJJ 0 Posted May 24, 2023 Thank you very much @programmerdelphi2k! It is easy when you know what to do. Share this post Link to post
JusJJ 0 Posted May 24, 2023 I found one problem. Changing background visible -> false it is impossible to change grid size and position at runtime. Share this post Link to post
programmerdelphi2k 237 Posted May 24, 2023 5 hours ago, JusJJ said: is impossible to change grid size and position at runtime. here works, at least! Quote procedure TForm1.Button2Click(Sender: TObject); /// StringGrind1 background = visible = false begin Memo1.Lines.Add('Before: StringGrid1.Width=' + StringGrid1.Width.ToString); Memo1.Lines.Add('Before: StringGrid1.Height=' + StringGrid1.Height.ToString); // StringGrid1.Width := 100; StringGrid1.Height := 100; StringGrid1.Position.X := 100; StringGrid1.Position.Y := 100; // Memo1.Lines.Add('After: StringGrid1.Width=' + StringGrid1.Width.ToString); Memo1.Lines.Add('After: StringGrid1.Height=' + StringGrid1.Height.ToString); end; Share this post Link to post
programmerdelphi2k 237 Posted May 24, 2023 7 hours ago, JusJJ said: Changing background visible -> false you can just change the COLOR to null color Share this post Link to post
JusJJ 0 Posted August 8, 2023 On 5/24/2023 at 4:18 PM, programmerdelphi2k said: here works, at least! It works this way, but if you try to enlarge it, it doesn't work Share this post Link to post