Board index » delphi » Problems saving memo text in stringlists.
L. Healy
![]() Delphi Developer |
Fri, 15 Apr 2005 01:58:52 GMT
|
L. Healy
![]() Delphi Developer |
Fri, 15 Apr 2005 01:58:52 GMT
Problems saving memo text in stringlists.
Hi All,
What would be the best way to store memo text in a stringlist? I need to let my users makes notes etc in a memo field, using the cr/lf I could do it other ways using different files for storage but I need Does anyone have any suggestions ? Thanks, |
Stephen Pos
![]() Delphi Developer |
Fri, 15 Apr 2005 06:46:02 GMT
Re:Problems saving memo text in stringlists.On Sun, 27 Oct 2002 17:58:52 +0000, "L. Healy" Quote<L.He...@occpsy.demon.co.uk> wrote: you transfer the note text out of the TMemo. Or how about using a collection (e.g. a TList) of StringLists, each of Stephen Posey |
L. Heal
![]() Delphi Developer |
Fri, 15 Apr 2005 07:59:20 GMT
Re:Problems saving memo text in stringlists.In article <3dbc6cc3.3449...@news.concentric.net>, Stephen Posey <slpo...@concentric.net> writes Quote>On Sun, 27 Oct 2002 17:58:52 +0000, "L. Healy" Do mean replacing the cr/lf with an arbitrary string which gets |
Julian Eriks
![]() Delphi Developer |
Fri, 15 Apr 2005 18:41:47 GMT
Re:Problems saving memo text in stringlists.Rather than using an arbitrary value, I replace them with "<BR>" when saving to disk, and if putting back into a memo replace "<BR>" with the CR/LF pair. This way the contents of the memo can, if required, be put in an HTML Julian Eriksen Quote"L. Healy" <L.He...@occpsy.demon.co.uk> wrote in message |
E
![]() Delphi Developer |
Fri, 15 Apr 2005 19:21:44 GMT
Re:Problems saving memo text in stringlists.Quote"L. Healy" <L.He...@occpsy.demon.co.uk> wrote in message <news:HcqyRIAclCv9Ew0A@occpsy.demon.co.uk>... How about just adding the TMemo.Text to the stringlist. My form has SL.Add( Memo1.Text); shows that the entries hold the full memo contents including #10#13's. A better idea might be to subclass the TStringList and overload the Ed Barrett unit Unit1; interface uses type TMyStringList= type var implementation {$R *.DFM} begin AddObject( aUniqueID, procedure TForm1.FormCreate(Sender: TObject); procedure TForm1.FormDestroy(Sender: TObject); procedure TForm1.Button1Click(Sender: TObject); Memo1.Clear; procedure TForm1.Button2Click(Sender: TObject); var Index: Integer; begin end. |
Maarten Wiltin
![]() Delphi Developer |
Sat, 16 Apr 2005 06:19:36 GMT
Re:Problems saving memo text in stringlists.QuoteEd wrote in message <22f4bce8.0210280321.6a1af...@posting.google.com>... Groetjes, |
VBDi
![]() Delphi Developer |
Sat, 16 Apr 2005 06:26:05 GMT
Re:Problems saving memo text in stringlists.Im Artikel <HcqyRIAclCv9E...@occpsy.demon.co.uk>, "L. Healy" <L.He...@occpsy.demon.co.uk> schreibt: Quote>I need to let my users makes notes etc in a memo field, using the cr/lf stringlist.Add(memo.Text) if the text should become a single entry in the stringlist. DoDi |
Rudy Velthui
![]() Delphi Developer |
Thu, 21 Apr 2005 21:47:49 GMT
Re:Problems saving memo text in stringlists.On Sun, 27 Oct 2002 17:58:52 +0000, "L. Healy" Quote<L.He...@occpsy.demon.co.uk> wrote: -- |
J Fren
![]() Delphi Developer |
Fri, 22 Apr 2005 11:29:05 GMT
Re:Problems saving memo text in stringlists.On Sun, 03 Nov 2002 14:47:49 +0100, Rudy Velthuis <rvelth...@gmx.de> wrote: Quote>On Sun, 27 Oct 2002 17:58:52 +0000, "L. Healy" the TStringList The use of <BR> to replace CrLf is one viable method Actually he might be wise to look at TIniFile as a storage medium, not The Memo could be an entire section. Quote
|
L. Heal
![]() Delphi Developer |
Fri, 22 Apr 2005 19:57:50 GMT
Re:Problems saving memo text in stringlists.In article <3dc5e709.1513...@news.u-net.com>, J French <Bounce_It_je...@iss.u-net.com_.bin> writes Quote>On Sun, 03 Nov 2002 14:47:49 +0100, Rudy Velthuis <rvelth...@gmx.de> Jerry is right. But thanks for the suggestion. I got it sorted and =========== Thanks All, for all your help, this was what I finally did, I'm posting The rest is mainly based on Alan's stuff plus some stuff he posted a procedure TFormMain.ButtonProduceDiaryReportClick(Sender: TObject); var begin begin begin //now sort out what is left by date order If (StringGridDiary.Cells[0,DatePosI] <> '') and (StringGrid begin until DiarySorted; end; |
1. Problems saving a stringlist to a BLOB field in PDOX
3. How to save memo.lines.text into a varchar 4000 field on MSSQL 7
4. How to save memo.lines.text into a varchar 4000
5. How to save memo.lines.text into a varchar 4000 field
6. Save and recall formatted text in Memo field
7. selection from memo to stringlist
8. SOS ListView to StringList to Memo.