tkinter文本小部件:盒子选择的多行闪烁式镜头
我为tk.text
创建了一个框选择功能。小部件获取font
高度,并从中构建.xbm
图像。 .xbm
通过image_create
用于所有选定的行,除了真正的行人所在的行之外。
如何使人造图像实例(s)与真实的商人眨眼?
还是
我可以朝着这些结果迈出的另一个方向?
I've created a box-select feature for tk.Text
. The widget gets the font
height and concocts an .xbm
image from it. The .xbm
is used as a faux-caret, via image_create
, for all selected lines except the line the real caret is on.
How do I make the faux-caret image instance(s) blink in time with the real caret?
or
What is another direction I can go to get these results?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的解决方案是明显地摆脱了真正的脑袋,在每一行上画一个人造镜头,然后调用一个函数,该功能不断用“ Off”的人造毛衣来交换“ On”人造毛衣。以下是一些相关的代码段。注意:我实际上有3个人造牌,因为我想要真正的活动线上的镜头更暗。
My solution was to get rid of the real caret visibly, draw a faux caret on every line, and then call a function that keeps swapping out an 'on' faux-caret with an 'off' faux-caret. Below are some relevant code snippets. Note: I actually have 3 faux-carets because I want the caret that is on the true active line to be a little darker.