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 

Bug report

 
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 02, 2006 7:06 pm    Post subject: Bug report Reply with quote

I think that there is a bug in TCustomSyntaxMemo.WndProc.

Code:
   
...

EM_LINESCROLL: begin
                    ScrollPosX := ScrollPosX + WParam;
                    ScrollPosX := ScrollPosX + LParam;
                    Result := 1;
                   end;

...


Should be...

Code:
   
...

EM_LINESCROLL: begin
                    ScrollPosX := ScrollPosX + WParam;
                    ScrollPosY := ScrollPosY + LParam;
                    Result := 1;
                   end;

...


Thanks.
Back to top
View user's profile Send private message
econtrol
Site Admin


Joined: 09 Jun 2006
Posts: 202

PostPosted: Wed Aug 02, 2006 11:27 pm    Post subject: Reply with quote

Yes, thank you.

Final implementation:

Code:
...
 
EM_LINESCROLL: begin
                    ScrollPosX := ScrollPosX + WParam;
                    TopLine := TopLine + LParam;
                    Result := 1;
                   end;
...


For information:
TopLine - Index of first visible line (also if this line is partially visible in wrod wrap mode).
ScrollPosY - Logical scroll position that corresponds to the position in vertical scroll bar, it's value is equal to TopLine only if there are no word wrap, collapsed ranges, hidden text.

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