rdbende / tkcode

Use Chlorophyll instead
https://github.com/rdbende/chlorophyll
MIT License
19 stars 3 forks source link

Create line numbers #1

Open rdbende opened 3 years ago

rdbende commented 3 years ago

Idea: creating linenumber beside of the editor, or codeblock. Good reference could be Dogeek's tkinter-pp implementation

image

nickheyer commented 3 years ago

Were you ever able to get this done? I've tried to manually create it a few times, and I can't seem to access the code block scroll bar from one CodeEditor to another. If you could somehow remove the scroll bar (like set a bool for scroll bar removal in CodeEditor instantiation), but be able to link the parent CodeEditors scroll bar with the child, I think it would work.

rdbende commented 3 years ago

Yes I have already made it but there are minor issues with it. Everything works great, but the numbers sucks at initializing. I could create a branch for it if you want.

nickheyer commented 3 years ago

I think you may have a better understanding of that than I. However, I did create some logic for auto indentation that you may be interested in. Really only useful for Python and other indentation-sensitive languages. Albeit a little "hacky".

See this code

rdbende commented 3 years ago

Thank you, I'll definitely implement this sometimes.

whmsft commented 2 years ago

Thank you, I'll definitely implement this sometimes.

I hope soon

leftbones commented 2 years ago

Any update on this?

rdbende commented 2 years ago

Any update on this?

Not yet.

I got frustrated with Tkiner and haven't used it in the last year or so. Instead, I started my own GUI framework. Check it out, if you're interested: @tukaan

Moosems commented 2 years ago

@rdbende I have a semi-working linebar for text widgets. It needs some work though because large files make the numbers go offscreen do the numbers need to dynamically resize but I do have a base if you would like it

Moosems commented 2 years ago

@rdbende Once we add this would we want to make an option to not highlight anything because at this point it's a good text editor in general. I would like a highlightless option for text files because making more themes seems like a hassle (Making my light and dark themes took hours)