I am using two wx.TextCtrl's and I set a long text as the initial value of both controls with the SetValue method. The text from the first control is only partially visible (shifted to the left side), in the second control, the full text is visible. The first control has the focus and the text is selected. Here is my code:
import wx
long_text = "Hello 0123456789012345678901234567890123456789"
class TestFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, -1, "Test")
panel = wx.Panel(self, -1)
sizer = wx.BoxSizer(wx.VERTICAL)
panel.SetSizer(sizer)
input0 = wx.TextCtrl(panel, -1)
sizer.Add(input0, 0, wx.EXPAND)
input0.SetValue(long_text)
input1 = wx.TextCtrl(panel, -1)
sizer.Add(input1, 0, wx.EXPAND)
input1.SetValue(long_text)
app = wx.PySimpleApp()
TestFrame().Show()
app.MainLoop()