93
questions
0
votes
0
answers
202
views
How can I add formatting lines to a TMemo in Delphi
Just tried to find this on the net to no avail.
All I want to do is add a solid line between each row in a tmemo in Delphi
but for the life of me I cant find out how.
Should be just a property - ...
0
votes
3
answers
184
views
How to make TMemo treat new lines in Linux style?
I have a string that contains Linux style line breaks. Linux style is #13 while Windows style is #13#10.
I would like to show this string in a TMemo. Looks like TMemo accepts only Windows style and ...
1
vote
0
answers
83
views
Buttons popup on a TMemo on MouseEnter and disappears on MouseLeave
procedure TfrmMain.memInfoMouseEnter(Sender: TObject);
begin
if AktivArt then
begin
btnAddMemo.BringToFront;
btnEditMemo.BringToFront;
end;
end;
procedure TfrmMain.memInfoMouseLeave(...
0
votes
1
answer
325
views
Changing a TMemo font size @ runtime
How does one change a FMX.TMemo font size @ runtime? In the following app the Spinbox1.Change method does not change the Memo.Font.Size. I have tried the BeginUpdate() and EndUpdate() methods of the ...
1
vote
3
answers
70
views
Set tMemo top item
How can I make a tMemo display starting at the top item please?
I have not found anything like a "TopItem", and wonder if it has to be done
by somehow sending messages (keydown control, ...
1
vote
1
answer
218
views
Write more lines TMemo (Delphi XE)
In a TMemo, I must report information on multiple lines:
procedure TForm1.FormCreate(Sender: TObject);
var
ids: TidIpWatch;
Speed: Double;
begin
ids := TidIpWatch.Create;
Speed := GetCPUSpeed;
...
2
votes
1
answer
195
views
How to interfere when user presses CTRL+X and still keep TMemo's default CTRL+X behavior?
I have a TMemo on the form and I've set an OnChange event for it. I hope the OnChange event not to be triggered when the user presses Ctrl+X in the memo. But Ctrl+X just cuts the text selection, which ...
0
votes
1
answer
247
views
Paste multiple string to TMemo in C++Builder
I have a vector of Strings from a TListView control. I want to copy them to the clipboard, then paste them into a TMemo control such that each line from the list is on a separate line in the TMemo. ...
0
votes
0
answers
140
views
What's the proper way to modify an existing FMX control?
I need to modify the behavior of the built-in FMX TMemo control. I never done this before and want to know what's the proper way to do it. Under C:\Program Files (x86)\Embarcadero\Studio\21.0\source\...
1
vote
1
answer
2k
views
How can I select the second copy of a text in a TMemo
I have a TMemo with text inside it, for example:
Text1
Hello World!
Sky
Text123
I use a simple function to select the first time a text was found
Memo1.SelStart := Pos(AnsiLowerCase('Text'), ...
1
vote
1
answer
333
views
How to execute my custom action when right-clicking on a TMemo control?
In a Delphi 10.4.2 32-bit VCL Application, I need to do different actions when the user (left- or right-)clicks on a TMemo control (which is in ReadOnly mode):
procedure TForm1.Memo1MouseDown(Sender: ...
1
vote
2
answers
1k
views
Get the caret position (line and char) in an FMX TMemo
I try to show the position of a memo's caret in a statusbar which contains two labels.
I tried this:
lblX.Text := Memo.Caret.Pos.X.ToString();
lblY.Text := Memo.Caret.Pos.Y.ToString();
The two ...
2
votes
1
answer
439
views
How to ask Delphi memo components (TMemo, TcxMemo) to recalculate line breaks? How to prevent the fixed wrapping of lines?
I am trying to use Delphi (Delphi 2009) TMemo and TcxMemo components - I have WordWrap=True and Scrollbars=[vertical scrollbar] and I am adding 4 very long text lines. The memo component automatically ...
0
votes
0
answers
352
views
How to underline words after spell check using Delphi
I'm trying to develop a text editor with spell checker capability. I can detect erroneous words successfully.
Many text editors underline (red color) the erroneous words like this.
How can I ...
0
votes
2
answers
803
views
How do I find out the number of characters in a tmemo component?
What I am trying to do is make a button that takes the amount of chars in a memo and output it in a label
I apologise if this seems like a silly question but I am still learning about Delphi.
4
votes
1
answer
696
views
Convert a Vcl::Controls::TCaption aka (System::UnicodeString) to a const char *
I'm currently using C++Builder to create an application that copies text to the user's clipboard. I've placed a TMemo control and I want to contain that in a const char * variable as seen in the code ...
0
votes
1
answer
821
views
How to disable the popup menu of TMemo?
I'm using Firemonkey TMemo component in my desktop application, I hope that when the user right-clicks or Long-Taps on the Memo , the default menu will not been pop up.
0
votes
0
answers
176
views
Firemonkey TMemo OnChangeTracking strange behavior on Android
Does any one had same issue, then on run time created TMemo fires OnChangeTracking only then TMemo is empty (no lines) and only for the first entered symbol. And also then all text is deleted?
If ...
0
votes
1
answer
200
views
Firemonkey styled TMemo does not get focus
I dropped a TMemo and a regular TStyleBook on a Form. I edited the custom style for the TMemo by adding a TRectangle to background so TMemo now has a different background color, and changed the TMemo....
0
votes
1
answer
784
views
Changing the background color behind a selected substring in a Firemonkey TMemo component
I wish to programmatically set focus on a particular substring in a (Delphi 10.3.1) Firemonkey TMemo component, by painting a yellow background behind the substring. The code below paints a yellow ...
0
votes
0
answers
76
views
Get correspondence of screen line to TStrings line in TMemo descendant
TRichEdit is causing too much access violations and issues in popup menu when styles are set, therefore I am trying to make a simple colorful TMemo descendant where each line from Lines could be ...
2
votes
1
answer
394
views
How to get text position (in pixels) in TMemo?
I want to get the position/placement in pixels of a text (aWord) in a TMemo. My code is something like this:
var
Size: TSize;
Pt: Cardinal;
aWord: string;
x, y: Integer;
begin
...
Pt := ...
0
votes
1
answer
287
views
How to avoid flickering when animating GUI components in Lazarus
I'm moving a TMemo object left and right in my GUI application. The problem is, is that the letters in my TMemo are flickering as soon as the movement starts.
I've looked this up, and, apparently, ...
2
votes
2
answers
5k
views
How to edit Text in Memo?
I wanted to use procedure Delete(Memo.Text, index, count) (or similar Insert). But I get message 'Constant object can not be passed as var parameter'. I know I can select text and to use this ...
0
votes
0
answers
143
views
slow to assign value to TMemo when string source is file
I am generating text (standard alpha chars only) into a std::string converting to a char[]-array to wchar and assigning it to a TMemo box... (c++ Builder.) At another point (function) I am reading (...
1
vote
2
answers
410
views
Make TMemo show partially visible lines
Is it possible to make TMemo show partially visible lines? I'm looking for a native way to do that, without custom rendering.
I made an example screenshot for those who not familiar with this issue:
...
0
votes
0
answers
548
views
Using TAB to exit a TMemo component
I have a requirement to allow users to tab around a Delphi application screen in a certain order. This is fine for almost everything, except that I can't seem to find a way to tab OUT of a memo ...
-2
votes
1
answer
2k
views
How to get values from a field and assign to a TStringList?
How do I get all the username values from the image below and can convert them into TStringList, strings or TMemo?
I tried the following code but it didn't work.
with q3 do
var txResul:stringlist
...
1
vote
2
answers
4k
views
TMemo Scrolling in Delphi
I am adding lines of text to a TMemo using : Memo1.Lines.Add(Text), which causes Memo1 to scroll to the bottom.
Is there any way to either stop it scrolling as I add lines, or force it to go back to ...
0
votes
1
answer
787
views
DELPHI move 2nd line to 1st Line Memo
I need to transfer the 1st line of Memo1 to Memo2, and move the remaining lines of Memo1 up.
These are the expected results:
0
votes
2
answers
1k
views
How to capture memo text to edit Delphi
I would like to capture dynamic gateway IP populated in a memo to a text box.
How can I do it with either wildcards or capture the whole line of gateway that starts with "Gateway: 10.127.*.*" and get ...
1
vote
1
answer
325
views
OSX scroll bars for TMemo and TListBox
Using Delphi XE7 Firemonkey
I've dropped a TMemo on a blank form and then added more lines of text to the TMemo than it can hold (so that scrolling is necessary).
On Windows everything works as ...
0
votes
2
answers
472
views
Delphi memo why cursor going to the Left always [closed]
In my VCL project, I have a TMemo with the following text (| is the caret):
| |
|Hello world | |
| |
|test |
| |
|...
-2
votes
1
answer
2k
views
DBGrid lines shown in a Memo
Is there any way to show a selected DBGrid record record in a memo?
I tried this type of code but this shows the titles of the columns and I want to show the fields' text.
procedure TForm6....
1
vote
0
answers
751
views
PostgreSQL + Delphi XE7 + ADO + ODBC
Our application successfully communicates with various databases (MSSQL, Oracle, Firebird) via ADO, that's why I'm trying to use ADO to add the PostgreSQL option to our software. I use standard ...
3
votes
1
answer
2k
views
Calculating max chars per line in Delphi TMemo
I have a TMemo.
I´d like to put some text in each line of TMemo without the line wordwrap.
I need calculate how many characters I can put in a line without TMemo make a wordwrap in that line.
...
0
votes
1
answer
165
views
Fmx TMemo unable to show a base64 string appropriately
I need to show a base64 key in a TMemo. Unfortunately, it is impossible to show this base64 string appropriately: it is cut off at every '/' by a Carriage return, or at any '+' where it systematically ...
2
votes
2
answers
2k
views
Lock the begining of the text in a TMemo
I would like to have a TMemo which will always begin with the string 'SELECT c_name FROM ' and I want to lock it so users cannot remove or replace this string in the TMemo, they will have to write ...
1
vote
1
answer
818
views
Memo lines to TreeView
Good night friends,
I'm currently working on a project that involves enumeration of visible windows and their descendents (also visible).
And I can transfer all nodes of TreeView for a Memo (in text ...
0
votes
2
answers
103
views
hide file for my application
As a beginner I have a little problem. I've finished conception of a little application developed in C++ Builder.
I've used a Tmemo that has huge amount of texts in order to use them in my ...
-2
votes
2
answers
1k
views
Delphi - Text from file in ZIP to Memo
In some ZIP file I have file head.txt. I want to copy text from this file to TMemo on my form. Here's my code:
procedure TformMain.LoadProject(InputFileName: string);
var
MS: TMemoryStream;
zip: ...
7
votes
1
answer
9k
views
Add lines to the top of a memo in Delphi
The function Memo.Lines.Add('Some text') in Delphi adds the string to the bottom of the memo. Is there any function which adds the text to the top?
For example, if the Lines property of the Memo ...
1
vote
1
answer
2k
views
How to find and select every occurences of specific word in Memo?
I am making application which replaces different words of two very similar speaking languages. Number of words by time will probably reach at least 10.000+. There is no big differences in words, it is ...
-1
votes
1
answer
3k
views
How to delete a line found by text from a TMemo control?
I'm having a TEdit, TMemo and a button. When the user presses the button, I want to delete from that memo control a line matching the text entered in the edit box. If no matching line is found, some ...
0
votes
1
answer
1k
views
Cannot paste from clipboard into a TMemo
I have a client that reports he cannot paste into a TMemo from the clipboard. I also have code that calls TMemo.PasteFromClipboard, but this does not work.
He is using Windows 8 (not sure if 8.0 or 8....
-1
votes
3
answers
1k
views
How to save and load captions of several labels?
I need to save and load captions of several labels. I tried use TMemo for this:
procedure TForm1.Button1Click(Sender: TObject);
begin
if SaveDialog1.Execute then
begin
Memo1....
4
votes
1
answer
2k
views
TMemo max width
Is there any way to make TMemo display text longer than 1024 into 1 line?
Take a look this simple code:
procedure TForm1.Button2Click(Sender: TObject);
var
s: string;
i: integer;
begin
s :...
0
votes
1
answer
3k
views
Reading the last line in a Tmemo in delphi
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 ...
1
vote
3
answers
4k
views
Removing specific lines on memo
I have memo with unwanted character in lines, and I want to remove them all.
Here is my code:
var
del: Integer;
begin
for del := 0 to m0.Lines.Count - 1 do
begin
if (AnsiContainsStr(m0....
0
votes
1
answer
1k
views
Firemonkey TMemo text auto carriage return
Is it possible for TMemo to automatically show a line from a db adjusted to the width of the TMemo? I mean, inside my db i have: "123456789123456789123", and the width of my tmemo is just 10 ...