The SynEdit control has an event OnGutterGetText. I would like to use this to make the gutter only display every 10th line number (also line 1 and currently selected line). The same way that the Delphi (XE7) IDE works. How do I determine whether to show the line or not using this event?
How to show line numbers for every 10 lines?
808 views Asked by Jerry Dodge At
1
The question transpires to be nothing to do with the edit control in reality. You simply want to know if
ais an exact multiple ofb. That is so if the remainder ofadivided bybis zero. And the remainder operator in Delphi ismod.Now, in your case you want
This assumes that
LineNumis one based. If it is zero based then you need