[SOLVED]Underline character in app hint tips lazarus / 21-General ---------------------------------------------------------------------- petevick · 2022-02-04 11:48 I don't suppose it's possible to display an underlined character in a hint tip is it? I know that for a button you place a & in front of the character that you'd hit Alt+character for. It looks like hint tips are just plain text, it'd just be kinda nice to see what the shortcut character was in the hint tip. ---------------------------------------------------------------------- Zvoni · 2022-02-04 12:42 Not sure if i understood you correctly: Let's say, you have an "A" as the accelerator for a Button "Save", which is displayed as "Save" And you want the hint tip to show what? "Instead of clicking on the Button you can also hit ALT + A on the Keyboard" with the "A" being "dynamically" inserted? ---------------------------------------------------------------------- petevick · 2022-02-04 12:53 Quote from: Zvoni on February 04, 2022, 01:42:14 pmNot sure if i understood you correctly: Let's say, you have an "A" as the accelerator for a Button "Save", which is displayed as "Save" And you want the hint tip to show what? "Instead of clicking on the Button you can also hit ALT + A on the Keyboard" with the "A" being "dynamically" inserted? If the hint tip text for a button is say "edit Current field",  and the accelerator is Alt+C, then I'd like the hint tip to display as 'edit Current field'. Basically, can you apply underlining to hint tip text. ---------------------------------------------------------------------- Zvoni · 2022-02-04 13:01 Don't think so. the character "C" is ASCII 67, independent if it's displayed underlined or not. The "underline" (as well as Bold, italic) are a property of the TypeFace of the used Font. It's not part of the CodePoint of the Character I think there is a way to actually read (from code) which character is the accelerator of a control, since "&" becomes part of the caption/string, it's just not displayed (or better said: get's "translated" to be underlining the following character). I could guess at something like (not tested) Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i iPos:=Pos('&',Button.Caption);If iPos>0 Then AccChar:=Button.Caption[iPos+1];  EDIT: Of the top of my head coming to mind would be to use a (custom?) implementation of a HTML-capable "DisplayText"-Control (Label, whatever), which gets shown at the correct position, with Text formated with HTML-Tags ---------------------------------------------------------------------- PascalDragon · 2022-02-04 14:47 Quote from: Zvoni on February 04, 2022, 02:01:24 pmEDIT: Of the top of my head coming to mind would be to use a (custom?) implementation of a HTML-capable "DisplayText"-Control (Label, whatever), which gets shown at the correct position, with Text formated with HTML-Tags Lazarus itself uses a THintWindow with a HTML capable control embedded in it for its more complex hints. ---------------------------------------------------------------------- engkin · 2022-02-04 15:16 Edit C̲urrent Field <== Unicode Edit Current Field <== HTML ---------------------------------------------------------------------- petevick · 2022-02-04 15:24 Thanks for the replies guys, I really appreciate it. I'm not going to the trouble of custom implementation, it was just a thought, I would have only done it if it was an easy thing to apply. Thanks again. ---------------------------------------------------------------------- engkin · 2022-02-04 15:30 @petevick, just copy this text and try it: Edit C̲urrent Field ---------------------------------------------------------------------- petevick · 2022-02-04 15:51 Quote from: engkin on February 04, 2022, 04:30:38 pm@petevick, just copy this text and try it: Edit C̲urrent Field I got all excited  it displayed as that in the Hint property field, compiled it, the underline was missing  Nice try but no cigar ---------------------------------------------------------------------- engkin · 2022-02-04 16:05 I just saw your signature. I tested it on Windows with Laz 2.2.0. Check the attached image. ---------------------------------------------------------------------- petevick · 2022-02-04 16:07 Quote from: engkin on February 04, 2022, 05:05:09 pmI just saw your signature. I tested it on Windows with Laz 2.2.0. Check the attached image. Ah ok, I'll give it a try in Windows later ---------------------------------------------------------------------- engkin · 2022-02-04 16:17 Here is another one to try. It uses Combining Low Line: U+0332: Edit C̲urrent Field ---------------------------------------------------------------------- petevick · 2022-02-04 17:24 Quote from: engkin on February 04, 2022, 05:17:31 pmHere is another one to try. It uses Combining Low Line: U+0332: Edit C̲urrent Field Same thing, displayed as that in the Hint property field, compiled it, the underline was missing  . No cigar again ---------------------------------------------------------------------- engkin · 2022-02-04 20:13 It seems like your OS doesn't like cigars