atk icon indicating copy to clipboard operation
atk copied to clipboard

Bind for Text Selection and Tag

Open sunshine69 opened this issue 3 years ago • 2 comments

Hi,

Thank you for the work, it looks good.

I am trying to build a small editor using this to replace / an alternative to gtksourceview. However I did not see how I can do:

  • Handling text selection in the Text widget (select and get text, and iter start/end
  • Create tags and apply to selection or bind on key event with text color so I can highlight it (similar to https://stackoverflow.com/questions/14786507/how-to-change-the-color-of-certain-words-in-the-tkinter-text-widget)

Many thanks,

sunshine69 avatar Mar 27 '21 20:03 sunshine69

not implement. but can call interp

tk.MainInterp().Eval(text.Id()+ " tag add highlightline 3.0 4.0")
tk.MainInterp().Eval(text.Id() + ` tag configure highlightline -background yellow -font "TkFixedFont" -relief raised`)

visualfc avatar Mar 29 '21 00:03 visualfc

Any plan or time to implement it?

sunshine69 avatar Apr 09 '21 03:04 sunshine69