|
|
|
|
@ -600,8 +600,7 @@ class TTkTextEdit(TTkAbstractScrollArea):
|
|
|
|
|
Demo: `textedit.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/demo/showcase/textedit.py>`_ |
|
|
|
|
(`Try Online <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?fileUri=https://raw.githubusercontent.com/ceccopierangiolieugenio/pyTermTk/main/demo/showcase/textedit.py>`__) |
|
|
|
|
|
|
|
|
|
`ttkdesigner Tutorial <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/ttkDesigner/textEdit/textEdit.rst>`_ |
|
|
|
|
|
|
|
|
|
`ttkdesigner Tutorial <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/ttkDesigner/textEdit>`_ |
|
|
|
|
|
|
|
|
|
:param lineNumber: Show the line number on the left, defaults to **False** |
|
|
|
|
:type lineNumber: bool, optional |
|
|
|
|
@ -653,103 +652,103 @@ class TTkTextEdit(TTkAbstractScrollArea):
|
|
|
|
|
|
|
|
|
|
.. py:method:: clear() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.clear` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.clear` |
|
|
|
|
|
|
|
|
|
.. py:method:: setText(text) |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.setText` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.setText` |
|
|
|
|
|
|
|
|
|
.. py:method:: append(text) |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.append` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.append` |
|
|
|
|
|
|
|
|
|
.. py:method:: isReadOnly() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.isReadOnly` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.isReadOnly` |
|
|
|
|
|
|
|
|
|
.. py:method:: setReadOnly(ro) |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.setReadOnly` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.setReadOnly` |
|
|
|
|
|
|
|
|
|
.. py:method:: document() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.document` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.document` |
|
|
|
|
|
|
|
|
|
.. py:method:: wrapWidth() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.wrapWidth` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.wrapWidth` |
|
|
|
|
|
|
|
|
|
.. py:method:: setWrapWidth(width) |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.setWrapWidth` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.setWrapWidth` |
|
|
|
|
|
|
|
|
|
.. py:method:: multiLine() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.multiLine` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.multiLine` |
|
|
|
|
|
|
|
|
|
.. py:method:: lineWrapMode() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.lineWrapMode` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.lineWrapMode` |
|
|
|
|
|
|
|
|
|
.. py:method:: setLineWrapMode(mode) |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.setLineWrapMode` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.setLineWrapMode` |
|
|
|
|
|
|
|
|
|
.. py:method:: wordWrapMode() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.wordWrapMode` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.wordWrapMode` |
|
|
|
|
|
|
|
|
|
.. py:method:: setWordWrapMode(mode) |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.setWordWrapMode` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.setWordWrapMode` |
|
|
|
|
|
|
|
|
|
.. py:method:: textCursor() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.textCursor` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.textCursor` |
|
|
|
|
|
|
|
|
|
.. py:method:: setColor(color) |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.setColor` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.setColor` |
|
|
|
|
|
|
|
|
|
.. py:method:: cut() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.cut` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.cut` |
|
|
|
|
|
|
|
|
|
.. py:method:: copy() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.copy` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.copy` |
|
|
|
|
|
|
|
|
|
.. py:method:: paste() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.paste` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.paste` |
|
|
|
|
|
|
|
|
|
.. py:method:: undo() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.undo` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.undo` |
|
|
|
|
|
|
|
|
|
.. py:method:: redo() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.redo` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.redo` |
|
|
|
|
|
|
|
|
|
.. py:method:: isUndoAvailable() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.isUndoAvailable` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.isUndoAvailable` |
|
|
|
|
|
|
|
|
|
.. py:method:: isRedoAvailable() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.isRedoAvailable` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.isRedoAvailable` |
|
|
|
|
|
|
|
|
|
.. py:method:: toAnsi() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.toAnsi` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.toAnsi` |
|
|
|
|
|
|
|
|
|
.. py:method:: toRawText() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.toRawText` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.toRawText` |
|
|
|
|
|
|
|
|
|
.. py:method:: toPlainText() |
|
|
|
|
|
|
|
|
|
This method forward to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.toPlainText` |
|
|
|
|
This method is forwarded to :class:`~TermTk.TTkWidgets.texedit.TTkTextEditView.toPlainText` |
|
|
|
|
|
|
|
|
|
''' |
|
|
|
|
__slots__ = ( |
|
|
|
|
@ -827,11 +826,14 @@ class TTkTextEdit(TTkAbstractScrollArea):
|
|
|
|
|
return self._textEditView |
|
|
|
|
|
|
|
|
|
def getLineNumber(self): |
|
|
|
|
'''getLineNumber''' |
|
|
|
|
return self._lineNumberView.isVisible() |
|
|
|
|
|
|
|
|
|
def setLineNumber(self, ln): |
|
|
|
|
'''setLineNumber''' |
|
|
|
|
self._lineNumberView.setVisible(ln) |
|
|
|
|
|
|
|
|
|
def setDocument(self, document): |
|
|
|
|
'''setDocument''' |
|
|
|
|
self._textEditView.setDocument(document) |
|
|
|
|
self._lineNumberView.setTextWrap(self._textEditView._textWrap) |
|
|
|
|
|