Back to my previous post, the request for information about :
OS / Version / Lazarus / Desktop / Keyboard
Windows / XP Pro 32 bit SP3 / 1.2.4 / Français [fr] / Français [Suisse]
was not innocent.
Having finally managed to install a lazarus (easy) on a reinstalled linux machine (debian+gtk2, well that installation didn't go so easy ...) I have done some tests.
All the remarks above in the discussion are consistent with the behaviour of the Accelerator characters on various Windows/LCL widget type's
Summary OS / LCL widget type -> result :
Win XP / Win32/Win64 -> None works and beeps
Windows 7 / Win32/Win64 -> According to rvk on August 02, 2014, 12:15:46 pm
windows 7 seems to behave like GTK2, see below.
Linux / Gtk -> Tested and works like I think it should work except it
never beeps, at least on my machine, when there
is no target for the Accelerator character.
Windows / Gtk -> >>>>>>>> Please can someone test. <<<<<<
QUESTIONS to rvk, Windows 7 : does it beep always when you do Alt+Valid_AccelChar (I think it shouldn't). Does it beep always when you do Alt+INEXISTENT_AccelChar (I think it should). Does TLabel.Caption.AccelTargetChar -> FocusControl ?
How it works on GTK, except it never beeps. Tested with Linus/GTK/Laz 1.2.4/Fpc 2.6.4
& in TLabel and TLabel.FocusControl set goes to the FocusControl -> works if the Accel_char has no duplicate (in my test I have a CheckBox with the same Accel_char), probably handled in the Gtk LCL widget set.
TRadioButton's and TCheckBox's -> does (handled within GTK) :
- if single target -> set's the focus to the target and does a either a Toggle_ON, default action or Checked:=not Checked for a TCheckBox.
- more than one target -> set's the focus to the target but takes not action.
The last 2 are logical because one wouldn't have a action automatically executed if there was a conflict.
Since the Accelerators never worked in version of WIN/WIN up to and including XP, having duplicate targets for a single AccelChar, except for the really annoying beep, did not matter much.
Nice to have guys around here willing to tackle that issue so Lazarus will not look amateruish in MS_Windows environment.
For the rest, since LAZ 1.2, everything is so good that I stopped using my, quite old, versions of Delphi.
Links you might follow :
http://forum.lazarus.freepascal.org/index.php/topic,20249.msg116625.html#msg116625http://forum.lazarus.freepascal.org/index.php/topic,24475.msg147314.html#msg147314http://bugs.freepascal.org/view.php?id=26523 -> contains, maybe to aggressive, patches that work with MS_WIN/Win on Laz 1.2.4/FPC 2.6.4 (Reversed in my installation for testing purpose) and Laz 1.3/Fpc 2.7.1, fully functional but would need testing for different platforms. Something I haven't figured out is how to just set the focus on TRadioButton without Toggling when there are more than one AccelChar target, but I'll find way.