Forum > LCL

[SOLVED] Control.hint does not process pipe character ( | )

(1/1)

dadycool:
Dear all

I have problem with <control>.hint as it will ignore any remaining text after a pipe | character.

Here an example code


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm1.Button1Click(Sender: TObject);var  myHint: string;begin  myHint:='Hello world | I am dadycool';  Form1.ShowHint:=true;  Button1.Hint:=myHint; //will show 'Hello world'  Image1.Hint:=myHint; //will show 'Hello world'  Shape1.Hint:=myHint; //will show 'Hello world'end; 
my setup detail...
Lazarus Version: 2.0.12
FPC Version: 3.2.0
Client: Windows 10 Desktop 21H1/19043.1466

Any help will be much appreciated. Thanks so much!


Bart:
This is by design.
The text after the pipe symbol is used for the "long hint".
IIRC you can use OnHint to display that part in e.g. a statusbar (but I may be wrong).

Bart

winni:
Hi!

Detailed info is here:

https://stackoverflow.com/questions/46944648/using-symbol-for-a-hint-text-in-delphi

Winni

dadycool:
Thanks Winni and Bart  :D

Navigation

[0] Message Index

Go to full version