A code editor widget for customtkinter.

- Multiple language support
- Code syntax highlighting
- Multiple Themes
- Right-click copy-paste menu
- Line numbers on left side
- Fully customizable
- Easy to Use
Download the source code, paste the CTkCodeBox folder in the directory where your program is present.
Requirements: Pygments and TkLineNums
import customtkinter
from CTkCodeBox import *
root = customtkinter.CTk()
codebox = CTkCodeBox(root, language="python")
codebox.pack(padx=10, pady=10, expand=True,fill="both")
root.mainloop()- .insert(index, code): insert code in the box
- .configure(kwargs): change parameters of the codebox
- .cget(parameter): get the parameter name from the codebox
- .update_code(): update the code syntax colors
- .clear_code(): delete all the code from the box
More lexers available here: https://pygments.org/docs/lexers/
abap, arduino, autumn, borland, colorful, default, dracula, emacs, friendly_grayscale, friendly, fruity, github-dark, gruvbox-dark, gruvbox-light, igor, inkpot, lightbulb, lilypond, lovelace, manni, material, monokai, murphy, native, nord-darker, nord, one-dark, paraiso-dark, paraiso-light, pastie, perldoc, rainbow_dash, rrt, sas, solarized-dark, solarized-light, staroffice, stata-dark, stata-light, tango, trac, vim, vs, xcode, zenburn
More style examples given here: https://pygments.org/styles/
Follow me for more stuff like this: Akascape
