问题描述
我是Devalla Bharath。
我试图在基于StyledTxtCtrl wxpython的项目中添加行注释功能。
目前,我正在做肮脏的工作,如下所示。
有人可以引导我吗?
def comment(self,e):
c=self.control.GetCurrentPos()
l=self.control.GetCurrentLine()
e=self.control.GetLineLength(l)
self.control.GotoLine(l)
if self.fileext=='.py':
self.control.AddText('#')
self.control.GotoPos(c+1)
elif self.fileext=='.html':
self.control.AddText('<!-- ')
self.control.GotoPos(self.control.GetCurrentPos()+e)
self.control.AddText(' -->')
self.control.GotoPos(c+5)
else:
pass
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)