Page 1 of 2
Different background color for procedures?
Posted: Fri Feb 02, 2007 10:06 am
by PB
Freak, how hard would it be to add an OPTION to make the background color
of each procedure be different to the default background color, by alternating
with two different user-specified colours?
Because it would make it easier to spot where procedures start and end when
coding, especially when you have lots of little procedures on-screen at once.
See my comparison screenshots further down.
Posted: Fri Feb 02, 2007 2:16 pm
by freak
I do not think it can be easily done, but i can have a look at it.
Posted: Fri Feb 02, 2007 2:41 pm
by Joakim Christiansen
I agree that an option like this would make the code more readable and that would actually be cool!

Posted: Fri Feb 02, 2007 2:41 pm
by r_hyde
I hope it's not extremely difficult, because I think it looks like a very useful feature!
Posted: Fri Feb 02, 2007 3:03 pm
by PB
Here's why I asked... the first shot is actual code from an old app of mine,
and the second shot is how it would look with this feature added. As you can
see, it makes it so much easier to differentiate between the procedures!
All the editor would have to do, is support the normal background color, but
let the user specify another alt background color, and then just toggle between
the two every time a new procedure is listed. That's my theory, anyway.
And for those who might say to just fold my procedures: I need to view them!
(BTW, apologies to those who hate ImageShack, but ImgSpot doesn't respond very much, so I've ditched it).
Posted: Fri Feb 02, 2007 3:13 pm
by Kaeru Gaman
PB wrote:(BTW, apologies to those who hate ImageShack, but ImgSpot doesn't respond very much, so I've ditched it).
it would be even more convenient, if you'll change the link a bit:
take the complete forums-tag including the thumbnail,
but change the URL from the php-link to the direct-link.
this will provide a commercial-free big picture connected with the conveniance of using the thumbnail...
demo:
(click to see the difference...

)
Posted: Fri Feb 02, 2007 3:32 pm
by gnozal
Cheap solution : use specials tags like this :

Posted: Sat Feb 03, 2007 12:25 am
by PB
> Cheap solution : use specials tags
No thanks -- that would require you to convert ALL your source codes.
Besides, I like the way I envision it, as it highlights the procedures.
Highlighting just a line is no good if that line is just off-screen. See:
If only the line above the procedure is highlighted:
If it's done the way I like (no need to modify sources):
Or, alternatively, maybe make the line number column have alternating colors
for the start of every procedure? I figure that since the line number column
is already drawing a line the length of the procedure, then it might be easy
to give it a different color background too? Take a look:
Basically, just any way to make procedures stand out more, would be good,
to visually separate the blocks of code.
Posted: Sat Feb 03, 2007 1:25 am
by kenmo
I don't like this idea... just make the fold-lines in the line number column stand out more and it's pretty easy to discriminate procedures.
Posted: Sat Feb 03, 2007 1:36 am
by PB
> I don't like this idea
That's why I said OPTION in capital letters... so you don't have to use it.
But, as you said, perhaps a thicker fold line would be just as good. As they
stand, they're pretty thin and don't do much to differentiate the procedures.
Posted: Sat Feb 03, 2007 6:19 am
by Flype
i voted yes because i like this idea.
Posted: Sat Feb 03, 2007 10:30 am
by Derek
Voted yes, if it's not too hard to implement and also optional then I think it would be a good thing to have, anything to make coding easier and quicker.
Posted: Sat Feb 03, 2007 11:28 am
by gnozal
Easy to implement : using the folding flags to draw an horizontal line above each folding marker

Posted: Sat Feb 03, 2007 12:04 pm
by PB
I deleted the poll because it was pointless.

Posted: Sat Feb 03, 2007 12:12 pm
by gnozal
PB wrote:@gnozal: you're still missing the point -- drawing a line like that still doesn't differentiate procedures if the top of one is not visible in the editor ...
I know it's not exactly want you want, but it's easy to implement. On the other side, I am not sure that what you've asked for is easy to do or even possible with scintilla. I don't see any obvious way to do it with the existing function set (but sometimes you don't see the obvious ...).