eduardosuruagy Posted September 19, 2019 Share Posted September 19, 2019 How do I change the color of a fixed stringgrid column? StringGrid.Columns[_Col].Title.Font.Color := clRed; Why doesn't this code work? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted September 19, 2019 Share Posted September 19, 2019 Hello type TStringGridHelper = class helper for TUniStringGrid procedure RefreshColumns; end; { TStringGridHelper } procedure TStringGridHelper.RefreshColumns; var P : procedure of object; begin TMethod(P).Code := @TUniStringGrid.ReconfigureColumns; TMethod(P).Data := Self; P; end; UniStringGrid1.Columns[1].Title.Font.Color := clRed; UniStringGrid1.RefreshColumns; Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted September 19, 2019 Author Share Posted September 19, 2019 1 hour ago, Hayri ASLAN said: UniStringGrid1.Columns[1].Title.Font.Color := clRed; UniStringGrid1.RefreshColumns; It worked, thank you very much !!! Quote Link to comment Share on other sites More sharing options...
MarceloZaniboni Posted April 17 Share Posted April 17 This code was working in version 1576, however it does not compile in version 1583, more specifically the code "@TUniStringGrid.ReconfigureColumns", I verified that the TUniStringGrid class was rewritten, would there be a solution to replace this code? Because I couldn't identify it, remembering that I'm using the Delphi 12.1 version. @Farshad Mohajeri @Homayoon @Hayri ASLAN @Sherzod @davidizadar Quote Link to comment Share on other sites More sharing options...
MarceloZaniboni Posted April 30 Share Posted April 30 On 4/17/2024 at 9:10 AM, MarceloZaniboni said: This code was working in version 1576, however it does not compile in version 1583, more specifically the code "@TUniStringGrid.ReconfigureColumns", I verified that the TUniStringGrid class was rewritten, would there be a solution to replace this code? Because I couldn't identify it, remembering that I'm using the Delphi 12.1 version. @Farshad Mohajeri @Homayoon @Hayri ASLAN @Sherzod @davidizadar Regarding the above question, I'm still waiting, could anyone help me? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 30 Share Posted April 30 Hello, We will try to check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 30 Share Posted April 30 4 hours ago, MarceloZaniboni said: Regarding the above question, I'm still waiting, could anyone help me? Hello, Sorry, can you attach a screenshot of what color you want to change? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 30 Share Posted April 30 2 minutes ago, Sherzod said: Sorry, can you attach a screenshot of what color you want to change? Do you want to change the color at runtime or ? Quote Link to comment Share on other sites More sharing options...
MarceloZaniboni Posted April 30 Share Posted April 30 1 hour ago, Sherzod said: Do you want to change the color at runtime or ? The problem is not the color, it's changing the column title at run time. Quote Link to comment Share on other sites More sharing options...
MarceloZaniboni Posted April 30 Share Posted April 30 the problem is that the tUniStringGrid class was rewritten, and the @TUniStringGrid.ReconfigureColumns function is not public, in version 1576 it is possible to call the function, in 1583 it is no longer possible Quote Link to comment Share on other sites More sharing options...
MarceloZaniboni Posted April 30 Share Posted April 30 the @TUniStringGrid.ReconfigureColumns method used to solve my problem Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 30 Share Posted April 30 What is your goal anyway? Quote Link to comment Share on other sites More sharing options...
MarceloZaniboni Posted April 30 Share Posted April 30 my goal is to change the column title at runtime Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 1 Share Posted May 1 19 hours ago, MarceloZaniboni said: my goal is to change the column title at runtime This post may help you: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.