Dear all, I have a code as following:
---------------------------------------- class operator(): ........... self.highlight = HighLight(docPointer, self._offset, self._matchlength) ......... class HighLight(QtGui.QSyntaxHighlighter): def __init__(self, doc, offset, matchlength): QtGui.QSyntaxHighlighter.__init__(self, doc) self.offset = offset self.matchlength = matchlength def highlightBlock(self, doc): self.format = QtGui.QTextCharFormat () self.format.setFontWeight(QtGui.QFont.Bold) self.format.setForeground(QtCore.Qt.darkMagenta) self.setFormat(self.offset, self.matchlength, self.format) -------------------------------------------- when i enter a word into a textbox, it will look for the word in another textbox, if the word is found, the highlight will be marked on that word. However, It highlighted correctly only on the one line text document, It will be wrong with multiline document. Is anything wrong in the code? Could you correct it? Thanks, Phon _______________________________________________ PyKDE mailing list PyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde