Remove Default Grey Edge from StyledTextCtrl frame.

does aneyone know the secret command to remove the Grey edge from left side of this StyledTextCtrl frame. I think it is a default edge designed for line numbers and such.

Text Program.py (472 Bytes)

text prograqm.JPG

It's not "secret". The STC is documented in several places; I prefer YellowBrain's docs:

<http://www.yellowbrain.com/stc/index.html&gt;

  Look in the section labeled "Margins".

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com

···

On Jul 29, 2006, at 11:44 PM, Walter Igo wrote:

does aneyone know the secret command to remove the Grey edge from left side of this StyledTextCtrl frame. I think it is a default edge designed for line numbers and such.

Walter Igo wrote:

does aneyone know the secret command to remove the Grey edge from left side of this StyledTextCtrl frame. I think it is a default edge designed for line numbers and such.

------------------------------------------------------------------------

import wx
import wx.stc as stc

class MySTC(stc.StyledTextCtrl):
    def __init__(self, parent, size=wx.DefaultSize,menu=None):
        stc.StyledTextCtrl.__init__(self, parent)

That's margin number one, so you can hide it by setting it's width to zero, like this:

          self.SetMarginWidth(1, 0)

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!