Recent

Author Topic: [SOLVED] Control.hint does not process pipe character ( | )  (Read 1209 times)

dadycool

  • New member
  • *
  • Posts: 8
[SOLVED] Control.hint does not process pipe character ( | )
« on: January 14, 2022, 04:07:56 pm »
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  [Select][+][-]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var
  3.   myHint: string;
  4. begin
  5.   myHint:='Hello world | I am dadycool';
  6.   Form1.ShowHint:=true;
  7.   Button1.Hint:=myHint; //will show 'Hello world'
  8.   Image1.Hint:=myHint; //will show 'Hello world'
  9.   Shape1.Hint:=myHint; //will show 'Hello world'
  10. end;
  11.  

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!


« Last Edit: January 14, 2022, 05:06:11 pm by dadycool »

Bart

  • Hero Member
  • *****
  • Posts: 4690
    • Bart en Mariska's Webstek
Re: Control.hint does not process pipe character ( | )
« Reply #1 on: January 14, 2022, 04:22:37 pm »
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

  • Hero Member
  • *****
  • Posts: 3057

dadycool

  • New member
  • *
  • Posts: 8
Re: Control.hint does not process pipe character ( | )
« Reply #3 on: January 14, 2022, 05:05:46 pm »
Thanks Winni and Bart  :D

 

TinyPortal © 2005-2018