I have a TextCtrl which is set to be multi-line. I have a function
say, updateText(msg), which takes some string and appends it to the
text control...
txtControl.AppendText(msg)
.....however, if the text that I am appending would cause the scroll
bars to appear/or scroll since the text is long the textcontrol appears
to be blank, until you click on the scroll bar...then the text appears.
Any ideas? is this is a sizer problem or a TextCtrl issue??
thanks
解决方案abcd wrote:
I have a TextCtrl which is set to be multi-line. I have a function
say, updateText(msg), which takes some string and appends it to the
text control...
txtControl.AppendText(msg)
....however, if the text that I am appending would cause the scroll
bars to appear/or scroll since the text is long the textcontrol appears
to be blank, until you click on the scroll bar...then the text appears.
Any ideas? is this is a sizer problem or a TextCtrl issue??
thanks
Don''t know for sure, but you can try calling the Refresh() method on the
text control and see if that fixes it.
On Oct 30, 2:52 pm, John Salerno
Don''t know for sure, but you can try calling the Refresh() method on
the
text control and see if that fixes it.
Didn''t make a difference. Not sure what the problem is, I am wondering
if it is a layout issue since that is my weak spot with wxPython.
sizerTextPanel =
wx.StaticBoxSizer(self.sizerTextPanel_staticbox, wx.HORIZONTAL)
sizerTextPanel .Add(self.textPane, 1, wx.ALL|wx.EXPAND, 2)
self.textPanel.SetAutoLayout(True)
self.textPanel.SetSizer(sizerTextPanel )
sizerTextPanel .Fit(self.textPanel)
sizerTextPanel .SetSizeHints(self.textPanel)
sizerMainPanel.Add(self.textPanel, 3, wx.ALL|wx.EXPAND, 0)
not sure if that means anything to anyone :)
abcd wrote:
sizerMainPanel.Add(self.textPanel, 3, wx.ALL|wx.EXPAND, 0)
Your best bet may be to post to wx************@lists.wxwidgets.org
But one question that comes to mind is, do you not add sizerTextPanel to
sizerMainPanel? I think all sub-sizers should be added to the main
sizer, unless there''s some weird reason I don''t know of.
If you post to the wxPython mailing list, you might want to include more
of your code so we can see the bigger picture.