Board logo

Subject: 在D7下模拟出D2007 IDE的行号显示 [Print This Page]

Author: chengyu.wang    Time: 2010-10-10 14:33     Subject: 在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) / Download count 22
http://bbs.cnpack.org/attachment.php?aid=766



Image Attachment: [代码] code.jpg (2010-10-10 14:33, 79 K) / Download count 25
http://bbs.cnpack.org/attachment.php?aid=767


Author: Passion    Time: 2010-10-11 10:11

,有点意思。
Author: kendling    Time: 2010-10-11 11:18

可以考虑增加成选项。
Author: somewho    Time: 2010-10-11 12:29

折叠呀,折叠呀,好想要折叠呀,最好能把任意的begin~end折叠呀




Welcome to CnPack Forum (http://bbs.cnpack.org/) Powered by Discuz! 5.0.0