4

I have a wx.TextCtrl that I am using to represent a display with a fixed number of character rows and columns. I would like to hide the vertical scrollbar that is displayed to the right of the text pane since it is entirely unnecessary in my application. Is there a way to achieve this?

Also...I would like to hide the blinking cursor that is displayed in the pane. Unfortunately, wx.TextCtrl.GetCaret() is returning None so I cannot call wx.Caret.Hide().

Environment info:

  • Windows XP
  • Python 2.5
  • wxPython 2.8
Brandon E Taylor
  • 24,881
  • 6
  • 47
  • 71

1 Answers1

4

How about setting the style wx.TE_NO_VSCROLL for the wx.TxtCtrl?

Matthew Rankin
  • 457,139
  • 39
  • 126
  • 163
  • That worked beautifully. Thanks. For some reason, TE_NO_VSCROLL is not a documented style in the doc set I am using. – Brandon E Taylor Sep 18 '09 at 03:07
  • No effect at all here :-( (wxPython 2.8.10 on Ubuntu karmic) – Bluehorn Jun 28 '10 at 10:37
  • 1
    Indeed, implementation seems sporadic: No effect on Win7, python2.7, wxpython 2.8.12.1 works on Linux, python 2.4, wxpython 2.8.12.0 Probably the reason it hasn't been documented. Dev beware, I guess. – Jason Viers Sep 26 '12 at 20:05
  • Worked perfectly on Windows 8, python v2.7 and wxPython v3.0 – ρss Apr 08 '14 at 10:15