hey everyone,<br><br>i decided its time to heavily improve myself in python-gui programming and so i started building my own editor/ide for PHP. so far, most of the general/basic features are inspired (read: mostly copy-pasted) by eric4 IDE build upon qt4/scintilla combination.
<br><br>but i came across to a weird problem with the scintilla's edgemodes. when i set it up to edgeline mode and the edgecolumn is set to 80, the edgeline is drawn (assuming the default scintilla settings) at approximately 50th character from the left (and 30th character when the lexer is off - aka txt files), instead of the expected 80. ive tried to play around with the lexers' styles to change fonts (courier new, size 10) and stuff but it keeps drawing the line on 50th column.
<br><br>ive made a non-elegant and non-pragmatic workaround to this, by setting the edgecolumn to 128 when the lexer is turned on and 213 when it is off. both values approximately match the 80th column for courier-new size 10.
<br><br>i originally thought that the column length for the edgecolumn value is computed from the character width of the particular font, and so that by changing the font or its size, the edgecolumn would change appropriately. dunno if this is the problem of scintilla (cause the exactly same thing is present in eric4 as well) or i just missed some important setting.
<br><br>this is the code that handles the edgecolumn stuff when the editor is launched:<br><br>[code]<br> edgeMode = Preferences.getEditor("EdgeMode")<br> edge = QsciScintilla.EdgeMode(edgeMode)<br>
self.setEdgeMode(edge)<br> if edgeMode:<br> self.setEdgeColumn(Preferences.getEditor("EdgeColumn"))<br> self.setEdgeColor(Preferences.getEditorColour("Edge"))<br><br>
[/code]<br><br>the EdgeColumn preferences value defaults to 80.<br><br>any ideas?<br><br>thanks in advance.<br>SHY<br>