Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Delphi
  4. Delete stuff in memobox

Delete stuff in memobox

Scheduled Pinned Locked Moved Delphi
questionhelptutorial
2 Posts 2 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aerosmith2k1
    wrote on last edited by
    #1

    I have a question is it possible to delete the content of a textfile which items are all in a memobox example AssignFile(f, 'C:\windows\system32\drivers\etc\hosts'); {Assigns the Filename} Append(f); {Opens the file for editing} //Writeln(f, '127.0.0.1 '+ memo); Writeln(F, Memo.text); //Could be multi-line... //Writeln(F, 'www.'+ Memo.text); //Could be multi-line... Closefile(f); {Closes file F} This appends to a file text from a memo field, I want a 2nd button that removes only the ontent that is currently in the same memobox. Trick is there is other items in the textbox so i cant just recreate the file. Anyone able to help ot give pointers?

    B 1 Reply Last reply
    0
    • A aerosmith2k1

      I have a question is it possible to delete the content of a textfile which items are all in a memobox example AssignFile(f, 'C:\windows\system32\drivers\etc\hosts'); {Assigns the Filename} Append(f); {Opens the file for editing} //Writeln(f, '127.0.0.1 '+ memo); Writeln(F, Memo.text); //Could be multi-line... //Writeln(F, 'www.'+ Memo.text); //Could be multi-line... Closefile(f); {Closes file F} This appends to a file text from a memo field, I want a 2nd button that removes only the ontent that is currently in the same memobox. Trick is there is other items in the textbox so i cant just recreate the file. Anyone able to help ot give pointers?

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      I don't understand good enough your question. Try yo use memo1.lines.savetofile and save content of Memo1 direct as file.


      I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups