Closed bibimbop closed 11 years ago
Yeah that would be a worthwhile enhancement (the column number).
I'm almost sure there's no way to get into the QPlainTextEdit display to put a vertical stripe at column 75 or whatever. (Remember that the font size can change, and in a small edit window you have a horizontal scrollbar...)
It looks possible to add a background image to QTextEdit. So that could be a generated image with one stripe at the right place. See http://www.codeprogress.com/cpp/libraries/qt/showQtExample.php?index=183&key=QTextEditBackgroundImage
No idea whether QPlainTextEdit would support that though.
Re the background image -- interesting! But I would have to track changes in font and font size and scale the bg image to match as the font got bigger or smaller, and am dubious this could be done accurately. It would be annoying if the column 75 stripe fell ahead or behind as the font changed.
It is difficult to align a text on a particular column without knowing the column position of the cursor. For instance that is necessary for poetry that have line numbers on the right, or indexes.
An extension of that would be to be able to mark a column in the editor of a different background color (ie. a sort of grid).