Ampersands (&) not handled properly in labels
Original Reporter info from Mantis: PaulvH
-
Reporter name: Paul van Helden
Original Reporter info from Mantis: PaulvH
- Reporter name: Paul van Helden
Description:
When you actually want to see an ampersand (without repeating it) you have the option to set ShowAccelChar:=False. The label resizes incorrectly though, showing that the textwidth function is not called with the necessary flag to show single ampersands. The fix should be trivial, but...
Additional information:
Request: I think that showing "accelerator characters" by default is idiotic. I know it is Windows default behaviour in functions like DrawText. You cannot assume that all labels on a form might be containing an accelerator char, so I would like the default of ShowAccelChar to be false at least.
My labels are often populated from a database so this problem only surfaces in the rare occasion that a string contains an &.
Suggestion: without a FocusControl set, the behaviour of a label might as well be as if ShowAccelChar=False since the programmer obviously isn't using that feature. The simplest solution would be to not have the ShowAccelChar property at all and show the label as if it was true only when FocusControl<>nil.
Mantis conversion info:
- Mantis ID: 15731
- Version: 0.9.28.3 (SVN)
- Fixed in version: 0.9.29 (SVN)
- Fixed in revision: 24944 (#a47badd9)
- Monitored by: » gongo (Dimitri Smits)
- Target version: 1.0.0
- LazTarget: 1.0