ShowMessage()
in Delphi XE5 shortens text.
Is this new to me, or it is due to the encoded characters when encoding a url? I need to see the entire thing.
I use the following function to encode my url:
function TConnector.EncodeUrl(aDecodedUrl: String): String;
begin
result:= tIdUri.URLEncode(aDecodedUrl);
end;
I then call in here:
zEncodedUrl := Connector.EncodeUrl('http://' + Connector.Host + 'Node:' + edtPath.Text + '.GetObjectListDataAsJSON');
EDIT: And I get this when passed to ShowMessage:
I should note that when debugging and placing my mouse over the zEncodedUrl
variable, it shows the full thing.
That's the native behaviour of the Vista task dialog, at least as called by Delphi. And the Vista task dialog is what gets called when you call ShowMessage
on Windows. It will not split lines that are too long. If your text included a space, it would be split.
A simple workaround would be to call good old MessageBox
.
MessageBox(Application.MainForm.Handle, PChar(Message), PChar(Caption), MB_OK);
You may want to fine-tune the choice of owner HWND
to pass, but you get the idea.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With