CnPack Forum


 
Subject: 在D7下模拟出D2007 IDE的行号显示
chengyu.wang
新警察
Rank: 1



UID 53186
Digest Posts 0
Credits 19
Posts 7
点点分 19
Reading Access 10
Registered 2010-10-10
Status Offline
Post at 2010-10-10 14:33  Profile | Blog | P.M. 
在D7下模拟出D2007 IDE的行号显示

修改了cnwizards\Source\SrcEditorEnhance\CnSrcEditorGutter.pas 346行
自娱自乐
        
        if ((Idx = 1) or (Idx mod 10 = 0) or (Idx = FPosInfo.LineCount)) then
          DrawText(Canvas.Handle, PChar(StrNum), Length(StrNum), R, DT_VCENTER or DT_RIGHT)
        else if (Idx mod 5 = 0) then
          DrawText(Canvas.Handle, PChar('--' + #0 ), 2, R, DT_VCENTER or DT_RIGHT)
        else
          DrawText(Canvas.Handle, PChar('-' + #0 ), 1, R, DT_VCENTER or DT_RIGHT)

[ 本帖最后由 chengyu.wang 于 2010-10-10 14:34 编辑 ]


Image Attachment: [效果] linenumber.jpg (2010-10-10 14:33, 29.74 K)



Image Attachment: [代码] code.jpg (2010-10-10 14:33, 79 K)

Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2010-10-11 10:11  Profile | Blog | P.M. 
,有点意思。
Top
kendling (小冬)
高级版主
Rank: 8Rank: 8
MyvNet


Medal No.1  
UID 703
Digest Posts 5
Credits 978
Posts 580
点点分 978
Reading Access 101
Registered 2005-2-18
Location 广东
Status Offline
Post at 2010-10-11 11:18  Profile | Site | Blog | P.M.  | QQ | Yahoo!
可以考虑增加成选项。




小冬
http://MyvNet.com
Top
somewho
新警察
Rank: 1



UID 52827
Digest Posts 0
Credits 9
Posts 3
点点分 9
Reading Access 10
Registered 2010-10-1
Status Offline
Post at 2010-10-11 12:29  Profile | Blog | P.M. 
折叠呀,折叠呀,好想要折叠呀,最好能把任意的begin~end折叠呀
Top
 




All times are GMT++8, the time now is 2024-11-25 15:31

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.008065 second(s), 8 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP