wx.textctrl

How to write wxPython textCtrl focus event

 ̄綄美尐妖づ 提交于 2019-12-24 03:10:12
问题 I'm trying to fire a line of code when the user clicks on a textCtrl. The end goal is to highlight the contents of the box when it is clicked on. I am aware that this is possible with wx.EVT_SET_FOCUS, but it's either buggy or I'm implementing it wrong. Here's my code: self.m_textCtrl1 = wx.TextCtrl(self.m_panel2, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size(100,-1), wx.TE_LEFT) self.m_textCtrl1.SetMaxLength(8) self.m_textCtrl1.SetMinSize(wx.Size(100,-1)) self.m_textCtrl1.SetMaxSize

How do I get the scroll position / range from a wx.TextCtrl control in wxPython

喜欢而已 提交于 2019-12-02 07:34:44
问题 I have a little logging app (written in wxPython) that receives data from a bit of kit we're developing, and I want to display the text in a scrolling window. As it stands I'm using a wx.TextCtrl for the text display, but I'm having some issues with the scrolling behaviour. Basically, I'd like it so that if the scrollbar is at the bottom of the window (i.e. the end of the incoming data), adding more data should scroll the view onwards. If, however the view has been scrolled up a little (i.e.

How do I get the scroll position / range from a wx.TextCtrl control in wxPython

风格不统一 提交于 2019-12-02 03:54:02
I have a little logging app (written in wxPython) that receives data from a bit of kit we're developing, and I want to display the text in a scrolling window. As it stands I'm using a wx.TextCtrl for the text display, but I'm having some issues with the scrolling behaviour. Basically, I'd like it so that if the scrollbar is at the bottom of the window (i.e. the end of the incoming data), adding more data should scroll the view onwards. If, however the view has been scrolled up a little (i.e. the user is looking at something interesting like an error message), the app should just add the text