tkcode icon indicating copy to clipboard operation
tkcode copied to clipboard

Create line numbers

Open rdbende opened this issue 4 years ago • 9 comments

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

image

rdbende avatar Jun 22 '21 18:06 rdbende

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.

nickheyer avatar Aug 06 '21 13:08 nickheyer

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.

rdbende avatar Aug 08 '21 17:08 rdbende

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

nickheyer avatar Aug 09 '21 10:08 nickheyer

Thank you, I'll definitely implement this sometimes.

rdbende avatar Aug 11 '21 19:08 rdbende

Thank you, I'll definitely implement this sometimes.

I hope soon

ayuloid avatar Nov 25 '21 15:11 ayuloid

Any update on this?

leftbones avatar May 03 '22 15:05 leftbones

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

rdbende avatar Jun 09 '22 08:06 rdbende

@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 avatar Jul 07 '22 19:07 Moosems

@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)

Moosems avatar Jul 08 '22 16:07 Moosems