tmemo

Reading the last line in a Tmemo in delphi

跟風遠走 提交于 2020-01-16 18:06:11
问题 After trying for a very long time .... decided to ask for help. I'm trying to read the last line sent to a Tmemo in Delphi. I'm sending lines of code one by one to a dev. board the dev. board needs different lines of code sent to it every time. My end goal is to read back the last line the dev. board sends back. E.G Set ATT = 7 --->> \sent to dev. board Dev. Board replies O.K <----- \ received from dev. board send next line of code. Or E.R.R send "set att = 7" command again. So far, I've got

Maximum Length of String in Delphi property Lines of TMemo [duplicate]

只谈情不闲聊 提交于 2020-01-03 13:08:14
问题 This question already has an answer here : TMemo max width (1 answer) Closed 5 years ago . I've been searching the reason why the maximum length of String in a TMemo.Lines is 1024, but not found yet. I have a text file which contains delimited / csv data which length is around 2000 characters. I use a memo to preview it before I process the file. memo.Lines.LoadFromFile(textFile); I have set the WordWrap to FALSE, and scrollBar to ssHorizontal. So any record will not be wrapped to the next

Maximum Length of String in Delphi property Lines of TMemo [duplicate]

我是研究僧i 提交于 2020-01-03 13:07:13
问题 This question already has an answer here : TMemo max width (1 answer) Closed 5 years ago . I've been searching the reason why the maximum length of String in a TMemo.Lines is 1024, but not found yet. I have a text file which contains delimited / csv data which length is around 2000 characters. I use a memo to preview it before I process the file. memo.Lines.LoadFromFile(textFile); I have set the WordWrap to FALSE, and scrollBar to ssHorizontal. So any record will not be wrapped to the next

TMemo cannot handle Unix text (LF as line ending) correctly

左心房为你撑大大i 提交于 2019-12-30 11:56:06
问题 TMemo cannot handle Unix enters (LF) correctly. Two lines separated with a LF are shown and treated as one line. I want to handle all possible text formating (Mac, Win, Unix). Obviously I could check the text and replace the LF with CRLF every time I: load text form file paste text use the Add() function use the Insert() function use the Appen() function change the content via Text property But this won't be an elegant solution. Lazarus solved this problem with the Lines.TextLineBreakStyle

How can I paste arbitrary data into a TMemo?

守給你的承諾、 提交于 2019-12-24 03:24:11
问题 Copying and pasting text is easy enough, since it's built into TMemo, but it seems that it can only handle text. Seems to me that any kind of data can be represented as a string, though. If I copy some arbitrary data from another program and want to paste it into a TMemo, how do I get Delphi to accept it as a raw string? 回答1: "If I copy some arbitrary data from another program and want to paste it into a TMemo, how do I get Delphi to accept it as a raw string?" So to clarify your question,

Automatically allowing Ctrl+A to select all in a TMemo?

半腔热情 提交于 2019-12-20 19:05:13
问题 In Delphi 7's TMemo control, an attempt to do the key combo Ctrl + A to select all does not do anything (doesn't select all). So I've made this procedure: procedure TForm1.Memo1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); var C: String; begin if ssCtrl in Shift then begin C:= LowerCase(Char(Key)); if C = 'a' then begin Memo1.SelectAll; end; end; end; Is there a trick so that I don't have to do this procedure? And if not, then does this procedure look OK? 回答1: This is more

How to paste a custom format clipboard data into a TMemo?

こ雲淡風輕ζ 提交于 2019-12-18 07:09:22
问题 This question refers to this one along with its accepted answer posted here on stackoverflow. I don't feel comfortable at Windows API programming. Exploring the way EasyGPS by Topografix handles clipboard manipulations, I discovered that it uses a custom clipboard format named GPX wich is actually plain XML text (GPX to be precise). Using Clipboard.AsText is excluded. I stumble at this stage: program ProbeClipboard; {$APPTYPE CONSOLE} uses SysUtils, Windows, ClipBrd; var CF_GPX: Cardinal;

Memo and create file and folder?

南笙酒味 提交于 2019-12-11 13:47:50
问题 I'm new to Delphi and i'm a french user so sorry for my bad english... So it is possible to create a file written in TMemo ? test.txt dir1/dir2/text.txt dir3/ My TMemo there are 3 lines, so I would like to take the first line and create the file test.txt in the current directory .. 2nd line: create a folder 3rd line: create a folder again+files.txt etc ... I think to use mkdir or ForceDirectories to create Directory and files? etc... So my conclusion was to automate it. You can help me please

Delphi. Analog of Memo/RichEdit

假装没事ソ 提交于 2019-12-10 22:23:28
问题 Does anybody know if there is an analog of Memo/RichEdit? Demand: to number lines, to load big files (more than 5 MB) from a stream. 回答1: Developer Express have an extensive set of VCL components, among them a Memo replacement (TcxMemo) and a RTF edit (I don't know about the feature set, though). 回答2: TMS Software has a very good TAdvMemo with a lot of syntax highlighters. And also has a TRichEdit "replacement". In addition to the syntax highlighting their memo supports line numbers. Don't

Delphi XE4 FireMonkey TMemo Transparent? (iOS)

馋奶兔 提交于 2019-12-07 03:20:57
问题 Is there any way to make the TMemo transparent in Delphi/iOS/FireMonkey? I don't see any way to edit styles myself when selecting + right-clicking the memo control... 回答1: Try removing memo's background on applying style event. procedure TForm1.Memo1ApplyStyleLookup(Sender: TObject); var BckObject: TFmxObject; begin BckObject := Memo1.FindStyleResource('background'); if Assigned(BckObject) and (BckObject is TSubImage) then begin TSubImage(BckObject).Source := nil; end; end; 回答2: You need to