onClick event not triggered for a TSpeedButton on a fresh created form when inside a TGroupbox
Original Reporter info from Mantis: Denis Bisson
-
Reporter name: Denis Bisson
Original Reporter info from Mantis: Denis Bisson
- Reporter name: Denis Bisson
Description:
A TSpeedbutton present inside a TGroupbox does not trigger the onclick event when the fresh created form is the result of a double-click on a tlabel.
Well... I know it sounds so simple and crazy, I must have overlook something but I don't see. If the TSpeedbuton is outside the TGroupbox is does not do the problem, if the newly form is created via a single-click it does not do the problem, etc. It seems to need to be that way. I attached a sample test program if you want to test. Me, I compiled it on two different computer with the same Lazarus version installed but on two different setup.
Steps to reproduce:
-I attached the minimalist project file so it's should be easy to open, compile and try.
-One compiled, run the project.
-Doubleclick on "Label2" with caption "Double-click, and not ok". This will create form2. There you have two speed button: one side a groupbox and one outside of the group box. If you click the one inside the groupbox it does not seem to trigger the event! But if you click the one outside of the groupbox, it will. Then, if you come again to click the speedbutton inside the groupbox, then it will work. After than, close that form with the top right corner x. You can double-click again an retry the same thing, it does it again.
-On the main form there is another label with caption "single click". It's curious to see that with that one, it does not do the problem, both speedbutton do the action.
Additional information:
-The same program works correctly when compiled in Ubuntu flavor. It does that only in windows.
-This was a minimalist program to show as clear as possible the minimal condition to reproduce the problem. But it's coming from a much more complex program when I always though the problem was related with a bad pointer or something. But I am happy to have simplified it to this simple case.
-Command line parameters for the compilation are these:
-MObjFPC -Scghi -O1 -g -gl -WG -vewnhi -Filib\i386-win32 -Fu....\lcl\units\i386-win32\win32 -Fu....\lcl\units\i386-win32 -Fu....\components\lazutils\lib\i386-win32 -Fu....\packager\units\i386-win32 -Fu. -FUlib\i386-win32 -l -dLCL -dLCLwin32