Last week I was given a requirement for an already crowded display/input screen written in wxPython (data stored in MySQL database) to show the first 24 characters of two free format comment fields but to allow up to 255 characters to be displayed/input. For instance on entry the screen might show “Right hip and knee X-ra” whilst the full entry continues “ys requested 24th September in both laying and standing positions with knee shown straighten and bent through 75 degrees”. Whilst I can create a wxtextCtrl that holds more characters than displayed (scrolls) I cannot work out how to display/enter the contents as a multiline box when selected. I have gone through our wxPython book and searched online with no joy.
Have you considered using my.TextCtrl.SetToolTipString() and setting it to the same value as the textctrl contents. In this manner only the first 24 characters show in the textctrl but if you hover over it the entire string will be displayed as a tooltip.
wxtextCtrl To Allow Input/Display Of More Text Than Default Display