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 

Behavior of DefaultStyles.CurrentLine

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

Joined: 12 Dec 2007
Posts: 12
Location: Poland

PostPosted: Wed Jan 28, 2009 5:34 pm    Post subject: Behavior of DefaultStyles.CurrentLine Reply with quote

(TSyntaxMemo 2.60; both Delphi 2007 and 2009),

1) I'm experimenting with the properties in DefaultStyles.CurrentLine, and most of them don't seem to have any effect. Only the BorderColorXxx and BorderTypeXxx properties seem to work. Other styling properties have no effect, for example:

DefaultStyles.CurrentLine.Font.Style (or Size),
BgColor, etc.

If I pick the correct FormatType, and if there is some memo text entered in the designer, the properties are honored correctly at design time, but not at runtime. Only the border type and color specified in the designer are used at runtime.

The styles do work when specified in code, e.g. in the form's OnCreate event:

with SyntaxMemo1.DefaultStyles.CurrentLine do
Enabled := true;
FormatFlags := [ffBold,ffItalic,ffUnderline,ffStrikeOut,ffReadOnly,ffHidden,ffFontName,ffFontSize,ffFontCharset,ffVertAlign];
FormatType := ftFontAttr;
BgColor := clMoneyGreen;
Font.Color clRed;
Font.Size := 12;

Most of the properties specified in the designer are present in the DFM file, however FormatFlags does not seem to be stored in DFM. Could this be the source of the problem?

2) A separate issue with the CurrentLine marker: regardless of the style settings, the movement of the marker is different in this version than it was before. Initially, the first line is marked as current. If I now move the caret down using the arrow keys, the current line marker doesn't follow the caret, but stays on the first line. The marker is only moved to the current line when I start typing / editing text.

(Edited to add:)

For bug (2), please check if you can confirm the following behavior:

a) after enabling the current line marker, run the program and click the top line of text. The top line will be highlighted.

b) using the arrow keys, move the caret one or more lines down. (The highlight does not follow the caret, even though it should).

c) Click the line containing the caret.

Result: both the top line and the clicked line are highlighted.
Expected result: only the clicked line should be highlighted.

Screenshot of the final result:

The problem (2) does not occur if soDrawCurLineFocus is set in Options, so perhaps this behavior is intended? What then is the interaction between DefaultStyles.CurrentLine.Enabled and soDrawCurLineFocus? Shouldn't there be only one of these two settings?

Thanks in advance for any hints,
Back to top
View user's profile Send private message Visit poster's website
Site Admin

Joined: 09 Jun 2006
Posts: 202

PostPosted: Sun Feb 01, 2009 1:23 pm    Post subject: Reply with quote

All these problems are fixed too.
They will be available in nearest update.

P.S. Registered users may request latest sources at any time.

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