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:
Yeah, this is a quirk of the textctrl on windows that happens because by default the whole content is selected and that leaves the caret at the end, and it scrolls a bit to make sure the caret is visible. The workaround is easy, just add something like this:
wx.CallAfter(theTextCtrl.SetInsertionPoint, 0)
···
On 11/4/12 3:44 AM, ErwinP wrote:
Hello,
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:
How can I enforce that the full text of the first control is visible ?