Toggle Line Wrap on TextCtrl

Hi All,

I'm building an application with wxpython and want to have a button that lets users toggle between line wrapping and horizontal scrolling in the main TextCtrl.

This seems like it should be pretty straightforward, but I can't find instructions on how to do it anywhere. Please help!

Kind Regards,
Ryan

The style wx.TE_MULTILINE cannot be added (so far) to a wx.TextCtrl after its creation. You can overcome this limit by subclassing the control. Inside the new class you will have two controls, alternatively shown and hidden, but sharing the properties Value, InsertionPoint and Selection; of course NOT the property NumberOfLines.

···

2009/2/18 Ryan McGreal editor@raisethehammer.org

Hi All,

I’m building an application with wxpython and want to have a button that lets users toggle between line wrapping and horizontal scrolling in the main TextCtrl.

This seems like it should be pretty straightforward, but I can’t find instructions on how to do it anywhere. Please help!

Kind Regards,

Ryan


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users