I'm looking for a solution for this, it seems the actual cursor change occurs here:
*$LAZHOME/lcl/interfaces/gtk/gtkwinapi.inc (function TGtkWidgetSet.SetCursor)* Am I correct? The function SetCursor() has a few internal functions. Why is there both a SetGlobalCursor() and a ResetGlobalCursor()? SetGlobalCursor() seems to be more straightforward than ResetGlobalCursor(). In theory we could always use SetGlobalCursor(), even when it's the default, right? Maybe there's some extra stuff that need to be done when the cursor is crDefault? If this code is correct, maybe the problem (assuming there's a problem) is in TGroupBox. Maybe it's not being visited in that traversing loop at ResetGlobalCursor() for some reason. PS: Should I add this to the bug report as a note? 2009/12/15 Alexsander Rosa <[email protected]> > Screen.Cursor from INSIDE a TGroupBox fails > http://bugs.freepascal.org/view.php?id=15351 > > 1. Create a new project (on Linux Ubuntu 9.04) > 2. Place a TGroupBox anywhere > 3. Place a TButton inside the TGroupBox > 4. Copy the following code into TButton.Click > > Screen.Cursor := crSQLWait; > Application.ProcessMessages; > Sleep(1000); > Screen.Cursor := crHourGlass; > Application.ProcessMessages; > Sleep(1000); > Screen.Cursor := crDefault; > Application.ProcessMessages; > > 5. Run the project, click the button. The cursor will change from crSQLWait > to crHourGlass, then to crDefault. Now move the cursor around the form: > while inside the GroupBox (but outside the Button) the cursor will be > crHourGlass; in all other areas of the form it will be the crDefault. > > PS: The bug report includes a complete example (small project). > > -- Atenciosamente, Alexsander da Rosa Linux User #113925 "Extremismo na defesa da liberdade não é defeito. Moderação na busca por justiça não é virtude." -- Barry Goldwater
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
