diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2014-06-17 23:50:06 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2014-06-20 14:15:52 +0100 |
commit | 8675daaef49b16116a6e49b869f0852d942f9845 (patch) | |
tree | a85a36a955549dd6267dab65bb5c2e2b184d01cc /examples/apps/nanoedit | |
parent | 7751c79f7f2240e528e90d1a9023635121218d8f (diff) | |
download | fpGUI-8675daaef49b16116a6e49b869f0852d942f9845.tar.xz |
nanoedit: use the textedit's Save and Load file methods
This then automatically handles cursor positions, scrollbars, invalidate
etc.
Diffstat (limited to 'examples/apps/nanoedit')
-rw-r--r-- | examples/apps/nanoedit/mainfrm.pas | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/apps/nanoedit/mainfrm.pas b/examples/apps/nanoedit/mainfrm.pas index 93f8f8a6..f652e179 100644 --- a/examples/apps/nanoedit/mainfrm.pas +++ b/examples/apps/nanoedit/mainfrm.pas @@ -80,7 +80,7 @@ begin try if dlg.RunOpenFile then begin - memEditor.Lines.LoadFromFile(dlg.FileName); + memEditor.LoadFromFile(dlg.FileName); FFileName := dlg.FileName; UpdateStatus(FFileName); end; @@ -99,7 +99,7 @@ begin dlg.FileName := FFilename; if dlg.RunSaveFile then begin - memEditor.Lines.SaveToFile(dlg.FileName); + memEditor.SaveToFile(dlg.FileName); UpdateStatus(Format('<%s> successfully saved.', [FFileName])); end; finally |