jarvisteach / appJar

Simple Tkinter GUIs in Python
http://appJar.info
Other
615 stars 68 forks source link

TextArea tags not showing tag ranges #558

Closed mtalimanchuk closed 4 years ago

mtalimanchuk commented 5 years ago

Hi! I am doing some text parsing and need to tag text in the TextArea on the go. I can do so by selecting a range, then pressing a button. The problem is, getAreaTextTag returns only the tag config and I haven't found a way to get the actual ranges, except for using tkinter's tag_ranges() and your widgetManager:

app.textAreaTagSelected('main_TextArea', 'Tagged') ta = app.widgetManager.get(app.Widgets.TextArea, 'main_TextArea') print(ta.tag_ranges('Tagged'))

Which IMHO is not very Pythonic. I see you used a lot of similar functions calling other tkinter's tag_xxx() methods but not tag_ranges(). Maybe it is worth implementing?

jarvisteach commented 5 years ago

Thanks for this, the text areas tag features is something I've not used much, so always happy to find out how people use it. This is definitely something we can add!

mtalimanchuk commented 5 years ago

@jarvisteach thanks for your reply! I'm glad to see the project is up. May I send a pull request with possible text area enhancements?

jarvisteach commented 5 years ago

Yes please! Can you make sure it's against the latest version of the next_release branch.

jarvisteach commented 4 years ago

Pull reuest #572 merged