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 as it is too based upon qt4 and scintilla.
<br><br>but i came across to a weird problem with the scintilla&#39;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/eric 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&#39; 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; edgeMode = Preferences.getEditor(&quot;EdgeMode&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; edge = QsciScintilla.EdgeMode(edgeMode)<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.setEdgeMode(edge)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if edgeMode:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.setEdgeColumn(Preferences.getEditor(&quot;EdgeColumn&quot;))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.setEdgeColor(Preferences.getEditorColour(&quot;Edge&quot;))<br><br>

[/code]<br><br>the EdgeColumn preferences value defaults to 80.<br><br>any ideas?<br><br>thanks in advance.<br><span class="sg">SHY</span>