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.
There are several ways to get the length of text in a TMemo. The fastest is to ask Windows to return the length (It is Windows which implement a TMemo):
MemoLen := GetWindowTextLength(Memo1.Handle);
or
MemoLen := SendMessage(Memo1.Handle, WM_GETTEXTLENGTH, 0, 0);
Another way is to retrieve the text of the memo and query his length:
MemoLen := Length(Memo1.Text);
The easiest way is to call the Memo's
GetTextLen()
method: