Home > front end >  How do you set up a click event on a TStringGrid column header (fixed) so visually it looks like you
How do you set up a click event on a TStringGrid column header (fixed) so visually it looks like you

Time:01-06

I am working with Lazarus v0.9.30. I have a TForm with a TStringGrid on it. I have a fixed row in the grid, which is where I have all of my column headers. Each column is a TGridColumn object and each column title is a TGridColumnTitleObject. When looking in the object inspector there are no events you can use for TGridColumnTitle. What I want to do is to be able to click on the column header and visually I want it to look like you are pressing a button. I want to intercept the click event and then perform an action on it (eg. sort by column text, or perhaps display a help screen). Is there a way to do this?

CodePudding user response:

On your grid set the Options.goHeaderPushedLook property to True.

  • Related