Skip to main content

Python3 tkinter text plugin - easily save and load multiple font styles

Project description

coloring pencils!

tttt - tims tkinter text tags

Save and load tags for the tkinter text widget using open office format xml

Features

  • Super easy to use api, All the commands you will need are below!

  • Automatically indent buttons on selection

  • Bold, Italic, Underline, Overstrike, Fonts, Sizes

  • Behavour of adding and removing tags is modeled on libre office

Installation

pip3 install tttt

Usage

There is a demo picture avaliable

from tttt import XmlManager

tag_manager = XmlManager(text)

bind these to your callback buttons or hotkeys

tag_manager.change_style('bold')
tag_manager.change_style('italic')
tag_manager.change_style('solid')                       # underline
tag_manager.change_style(('family',value))
tag_manager.change_style(('size',value))
tag_manager.change_style(('foreground', value))
tag_manager.change_style(('background', value))

Saving and loading

tag_manager.load(data)
xml_data = tag_manager.save()

Configuring Buttons For Indenting

tag_manager.button_references = {'bold':bold,
                                'italic':italic,
                                'underline':underline,
                                'family':family_font_menu.var,
                                'overstrike':overstrike,
                                'foreground':foreground,
                                'background':background,
                                'size':size_menu.var
                                }

Coming Next Release

  • copy/paste/saving formatted text

Changelog

0.1.1

  • many bugs removed

Authors and Contributors

Timothy Eichler

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tttt-0.1.1.zip (24.4 kB view hashes)

Uploaded Source

Built Distribution

tttt-0.1.1-py2.py3-none-any.whl (20.8 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page