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

Home » U++ Library support » LineEdit, EditFields, DocEdit » How to print the selected text in a LineEdit
Re: How to print the selected text in a LineEdit [message #3601 is a reply to message #3598] Mon, 05 June 2006 16:35 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
forlano wrote on Mon, 05 June 2006 09:54

Hello,

the procedure it is quite obvious:

1) select the text inside the LineEdit;
2) get the selected string with:
  String text = editor.GetSelection();

3) pass the string text to Report as discussed in another thread in this forum.

The problem: the selected text doens't contain the newline (\n) char. This means that you loose the format and the vertical alignment.
Any idea how to grab the text but preserving the newline char if it is present?

Luigi


Well, Report accepts Qtf. '\n' is ignored in QTF. Moreover, some sequences would be interpreted as control codes...

Solution:

String DeQtfLf(const char *s);

- escapes control sequences AND replaces '\n' with '&' (qtf line end).

Mirek


 
Read Message
Read Message
Read Message
Previous Topic: EditField and the Enter Key[SOLVED]
Next Topic: About the beahaviour of FileSel fs.Type
Goto Forum:
  


Current Time: Sat Apr 25 11:50:12 GMT+2 2026

Total time taken to generate the page: 0.01006 seconds