https://github.com/cuh4/fletcodefield
A Flet control that allows the user to write code with syntax highlighting. Uses the Markdown control under the hood.
https://github.com/cuh4/fletcodefield
flet flet-control python
Last synced: 3 months ago
JSON representation
A Flet control that allows the user to write code with syntax highlighting. Uses the Markdown control under the hood.
- Host: GitHub
- URL: https://github.com/cuh4/fletcodefield
- Owner: Cuh4
- License: apache-2.0
- Created: 2024-05-17T01:48:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-19T08:02:14.000Z (over 1 year ago)
- Last Synced: 2025-10-07T23:56:27.020Z (3 months ago)
- Topics: flet, flet-control, python
- Language: Python
- Homepage: https://dsc.gg/cuhhubsw
- Size: 85 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ⌨️ | Flet CodeField Control
## 📚 | Overview
A custom `TextField` control ripoff with syntax highlighting. Uses the `Markdown` control under the hood.

## ⚠️ | Limitations
- Only works for Windows (tested), Linux (untested), MacOS (untested). Mobile devices will not work with this.
- Pressing Tab will automatically focus a focus-able control. I can't prevent this due to Flet limitations.
- The default shift key mapping is for the UK layout. You can provide a custom mapping by passing it to one of the parameters.
- You cannot select the code.
- There is no text cursor, making it difficult to find out where you're typing.
## 🤔 | Example
If you want an example, follow the setup instructions below and run `src/CodeField.py`.
## 💻 | Setup
- Run `git clone https://github.com/Cuh4/FletCodeField && cd FletCodeField`
- Run `pip install -r requirements.txt`
- Extract `src/CodeField.py` to your project directory.
- Import it in your code (`from CodeField import CodeField`) and use it as a Flet Control.
## ✨ | Credit
- **Cuh4** ([GitHub](https://github.com/Cuh4))