Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » LineEdit, EditFields, DocEdit » Append separate Strings to a DocEdit[SOLVED]
Re: Append separate Strings to a DocEdit [message #3413 is a reply to message #3407] Wed, 24 May 2006 11:19 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
forlano wrote on Tue, 23 May 2006 17:01

Justin wrote on Tue, 23 May 2006 22:46

How can I add separate strings to an existing DocEdit? I am basically trying to create a section in my application where comments from a database can be appended through an array that would append these line by line. Thanks in advance

Justin


I typed in my application

DocEdit editor;

Then in a new line after typing "editor." appeared the list of all methods of the DocEdit class. There I saw the method Set() that put the file considered as string in editor and Get() that retrieve the document as a string. When you have your document as a string you can do everything you like treating it as string. So to append just use the operator <<.
I hope this is useful for you.

Luigi


This will work, but might be slow if your text is long (because Get will concat all lines to one String, Set will parse them back to lines).

Faster is to use "Insert" and "Remove".

Anyway, for relatively short texts (up to say 30KB) and low loads (say single append per user action), Get/Set method is okay and less hassle.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to Print a file inside LineEdit
Next Topic: Hide Passwords in EditField[SOLVED]
Goto Forum:
  


Current Time: Wed Aug 13 06:14:25 CEST 2025

Total time taken to generate the page: 0.06973 seconds