简体   繁体   English

Tkinter的ScrolledText小部件中的多个文本光标

[英]Multiple text cursors in Tkinter's ScrolledText widget

I have implemented column-selection (block-selection) in my text editor developed in Python 3 and using tkinter for GUI part. 我已经在用Python 3开发的文本编辑器中实现了列选择(块选择),并将tkinter用于GUI部分。

After the selection, I would like to place a text cursor at the start of every line, which is selected to facilitate parallel editing of text in multiple lines. 选择之后,我想在每行的开头放置一个文本光标,选择该光标是为了方便多行中文本的并行编辑。

I have no idea how to go about implementing this feature. 我不知道如何去实现这个功能。

Here's the code if it helps : https://github.com/markelonn/Text-Editor/blob/master/texteditor.py 如果有帮助,下面是代码: https : //github.com/markelonn/Text-Editor/blob/master/texteditor.py

Tkinter不支持多个插入游标。您必须通过插入游标图像或使用看起来像游标的字符,然后管理所有绑定以允许您同时编辑多行来模拟它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM