U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » LineEdit, EditFields, DocEdit » Added word wrap to LineEdit
Added word wrap to LineEdit [message #18494] Fri, 03 October 2008 20:10 Go to previous message
engineereeyore is currently offline  engineereeyore
Messages: 1
Registered: October 2008
Junior Member
I recently need a LineCtrl with word wrap, and seeing no support for it, altered the TextCtrl class to handle it. I thought perhaps someone else might need it, so I figured I'd post it up here if anyone wants to use it. It just uses a public function called UseWordWrap(bool) to make the necessary changes. Call that function (true == wordwrap, false == no wordwrap) and then any Insert call will automatically wrap lines.

I'm sure there are situations that won't work that I haven't come across yet, so use at your own risk. I've marked all alterations that I've made, so you should be able to easily identify what's changed.
  • Attachment: Text.cpp
    (Size: 14.96KB, Downloaded 530 times)
  • Attachment: TextEdit.h
    (Size: 14.13KB, Downloaded 539 times)
 
Read Message
Read Message
Read Message
Previous Topic: LineEdit and menu
Next Topic: Focus Event Handling in Edit Fields
Goto Forum:
  


Current Time: Sat Apr 25 11:34:33 GMT+2 2026

Total time taken to generate the page: 0.00597 seconds