EControl Ltd. Forum Index EControl Ltd.
VCL libraries and software support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Line numbers showing incorrectly

 
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor
View previous topic :: View next topic  
Author Message
mstaszew



Joined: 21 Jul 2006
Posts: 67
Location: North Carolina, USA

PostPosted: Wed Aug 09, 2006 6:06 pm    Post subject: Line numbers showing incorrectly Reply with quote

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
View user's profile Send private message
econtrol
Site Admin


Joined: 09 Jun 2006
Posts: 202

PostPosted: Wed Aug 09, 2006 8:26 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mstaszew



Joined: 21 Jul 2006
Posts: 67
Location: North Carolina, USA

PostPosted: Wed Aug 09, 2006 8:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
mstaszew



Joined: 21 Jul 2006
Posts: 67
Location: North Carolina, USA

PostPosted: Wed Aug 09, 2006 9:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
itsatomic



Joined: 12 Jun 2006
Posts: 38

PostPosted: Thu Aug 10, 2006 12:19 am    Post subject: Reply with quote

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
View user's profile Send private message
econtrol
Site Admin


Joined: 09 Jun 2006
Posts: 202

PostPosted: Thu Aug 10, 2006 9:50 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group