View previous topic :: View next topic |
Author |
Message |
mstaszew
Joined: 21 Jul 2006 Posts: 67 Location: North Carolina, USA
|
Posted: Wed Aug 09, 2006 6:06 pm Post subject: Line numbers showing incorrectly |
|
|
In my application, I am not seeing line numbers on lines that have TGutterObjects on them. This holds true for lines that have any gutter painting like the collapse/expand box for a code folding section. Is there a setting or something that I need to change to get line numbers for every line?
Thanks. |
|
Back to top |
|
|
econtrol Site Admin
Joined: 09 Jun 2006 Posts: 202
|
Posted: Wed Aug 09, 2006 8:26 pm Post subject: |
|
|
To control this use TSyntaxMemo.LineNumbers.UnderColor - color of line numbers
when there are objects on the gutter on the line.
When UnderColor = clNone, line numbers are not displayed in lines that has any additional images on gutter.
To make line numbers always visible set
Code: | TSyntaxMemo.LineNumbers.UnderColor = TSyntaxMemo.LineNumbers.Font.Color |
Michael. |
|
Back to top |
|
|
mstaszew
Joined: 21 Jul 2006 Posts: 67 Location: North Carolina, USA
|
Posted: Wed Aug 09, 2006 8:44 pm Post subject: |
|
|
The line numbers are then displayed behind the gutter image. Is there a way to have gutter images start just to the right of the line numbers so that both are visible? See image... [img]http://www.nator.net/Image.bmp[/img]
Thanks. |
|
Back to top |
|
|
mstaszew
Joined: 21 Jul 2006 Posts: 67 Location: North Carolina, USA
|
Posted: Wed Aug 09, 2006 9:19 pm Post subject: |
|
|
IGNORE MY LAST MESSAGE
I figured it out. I remembered you mentioning that I can add a TGutterObject with Collection = nil in the OnGetGutterImage. Doing so allowed me to put a dummy gutter object there that had ImageIndex = -1. That is just enough of a placeholder to make it look good.
Thanks. |
|
Back to top |
|
|
itsatomic
Joined: 12 Jun 2006 Posts: 38
|
Posted: Thu Aug 10, 2006 12:19 am Post subject: |
|
|
I think the answer is in the bands property - you can place them wherever
you like with bands.
I have played with this and missing one line number doesn't look too bad; a
few at a time may look a little sparse. It gets really interesting when the
source has over 1000 lines and you want to use a gutter object also.
I only noticed when playing around with all this that Delphi (in my current
setup) does not display line numbers at all. Weird.
If a source file has 1000+ lines, and you want both line numbers AND a
GutterImage to appear, would you
* make the line number font smaller
* increase the gutter width?
Aaron |
|
Back to top |
|
|
econtrol Site Admin
Joined: 09 Jun 2006 Posts: 202
|
Posted: Thu Aug 10, 2006 9:50 am Post subject: |
|
|
I think it will be nice feature TLineNumbers.BandAutoSize property that will change the width of line numbers band depending on line number string (that may be not only a number, but any string set using event hendker) of displayed lines.
If you want to trace this feature add it to mantis.
Michael. |
|
Back to top |
|
|
|