TTMSFMXGrid and Row Select


Last TTMSFMXTableView question of the day. I am generally getting acquainted with this table and loving it, and perhaps getting better!

Anyway, I have SelectionMode set to smSingleRow, yet when I click on a row, I still have a cell selection dotted highlight box - but at least the entire row is also highlighted. That does not feel like row select to me. How do I get rid of the cell selection dotted box and make this a true row select?

Scott Lynn

When the grid has focus, within a selected row the focused cell is indicated. The focus can only be on a single cell by design. Only from a single cell, the focused cell can change state from normal to editing state.


Thank you for your quick reply.
When the user has editing disabled and row select enabled, that seems like a poor design choice. The whole point of Row Select is that the programmers are trying to draw attention to the entire row and not any one cell in the row. I have been using different grids in Delphi for over ten years and I have never seen a grid behave this way.

Is there a way to override this behave, perhaps in a custom draw, so that there is no dotted focus rectangle on a single sell? Just a row select highlight? I would also be find if the focus rectangle was around the entire row, but that seems like a lot more work.


You can change the focused cell layout (via the style editor for example) and change the Stroke.Color for this layout from black to the same color as the selected cell layout color.

Fwiw, the default VCL TStringGrid and VCL TDBGrid do have this exact behavior by design & as default already from Delphi 1.


Appreciate the quick response. Is there a way to edit the topic title so others may benefit from the answers here? I am asking about a grid and not a tableview.

I will work on the style answer. I also saw the property DisableFocusEffect, but that does not do anything as far as I can tell. Working on styles for now.

- Scott