But scrollbar will only match 64 rows.
In my previous proof-of-concept (as I described some posts ago) I fixed that by hiding the control's scrollbar and putting a TScrollBar component next to the grid. I did the test with a standard TMemo instead of a TCustomGrid, but it did the trick perfectly. In any case, not only the scrollbars should be fixed; other features such as data range selection should also have to be redone with a different approach.
So, in my opinion, it is too much work for a complete MPHexEditor reworking, but I still think that a new (made from scratch) Hex component based on TCustomGrid is feasible.
[rant mode on]
Edit: never mind... I have just discovered that the min and max values of TScrollBar are also 32bit, so as a workaround I could use the ScrollBar to store the offset at the row level (so if I edit 16 columns, I can scroll files up to 2^32 * 16 bytes). The limit in that case would be 64GB. Still 'small' nowadays.
So, at this point, I see that most components in Lazarus have severe limitations to be used in a modern system (and for modern purposes). Definitely, if Lazarus/Free Pascal have become a niche language is for a reason.
Lazarus is not a RAD environment anymore if you have to build from scratch even a simple Scroll Bar component. Of course, in the case of the scroll bar there are third-parties alternatives such as ATControls (that I am in fact using for tabs, and I think it's a brilliant suite of components), but in my opinion, the stock classes should be usable without having to use external packages.
[rant mode off]