Column indicator draw lazarus / 31-LCL ---------------------------------------------------------------------- J-23 · 2018-01-28 03:03 Hello, I found the code that is responsible for drawing the 'indicator' in Grid but it needs to get to the code of the column on which the 'indicator' is drawn Where to look for it? Regards ---------------------------------------------------------------------- ASerge · 2018-01-28 13:01 Quote from: J-23 on January 28, 2018, 04:03:39 amI found the code that is responsible for drawing the 'indicator' in Grid but it needs to get to the code of the column on which the 'indicator' is drawn What is an 'indicator'? Do you want the position of the slider or its size and coordinates in pixels? ---------------------------------------------------------------------- jamie · 2018-01-28 15:17 I think he is looking to see how the grid lines are drawn on the screen, partitioned etc.. The TDrawGrid would be a good start. ---------------------------------------------------------------------- balazsszekely · 2018-01-28 15:25 The indicator is the small triangle in front of the focused row. Still I'm not sure if I' understood the question. It is drawn to the first fixed column. ---------------------------------------------------------------------- jamie · 2018-01-28 15:37 yeah, that looks logical..  I don't think that is part of the grid itself, it is something that needs to be drawn during the OnDrawCell or override the DoDrawCell etc.. Or you can use a TArray as a control on the left column located in Misc tab ---------------------------------------------------------------------- J-23 · 2018-01-28 16:33 Quote from: GetMem on January 28, 2018, 04:25:04 pmThe indicator is the small triangle in front of the focused row. Still I'm not sure if I' understood the question. It is drawn to the first fixed column. yes, it is about the "narrow space" on which the indicator is drawn. How to manipulate this space - where is it defined in Grid? ---------------------------------------------------------------------- balazsszekely · 2018-01-28 16:42 Quoteyes, it is about the "narrow space" on which the indicator is drawn. How to manipulate this space - where is it defined in Grid?You should subclass TDBGrid or write a class helper, but if you're lazy just copy DBGrid.pas from $(LazarusDir)\lcl folder to your project directory and change the line(see screenshot), or do whatever modifications are necessary. ---------------------------------------------------------------------- wp · 2018-01-28 16:45 If you are talking of the DBGrid, the indicator is drawn by TCustomDBGrid.DrawIndicators in DBGrids. The rectangle available for painting is passed as parameter R. It is called from TCustomDBGrid.DrawFixedText which in turn is called from TCustomDrawGrid.DefaultDrawCell if the DrawingState includes the flag gdFixed. DefaultDrawCell is called (via DrawCell) from TCustomGrid.DrawRow which is called from TCustomGrid.DrawAllRows. So the entire calling sequence is TCustomGrid.Paint --> TCustomGrid.DrawAllRows --> TCustomGrid.DrawRow --> TCustomDBGrid.DrawCell --> TCustomDBGrid.DefaultDrawCell --> TCustomDBGrid.DrawFixedText --> TCustomDBGrid.DrawIndicators. ---------------------------------------------------------------------- J-23 · 2018-01-28 20:19 Quote from: GetMem on January 28, 2018, 05:42:52 pmQuoteyes, it is about the "narrow space" on which the indicator is drawn. How to manipulate this space - where is it defined in Grid?You should subclass TDBGrid or write a class helper, but if you're lazy just copy DBGrid.pas from $(LazarusDir)\lcl folder to your project directory and change the line(see screenshot), or do whatever modifications are necessary. That's exactly what I meant. Thank you