I'm looking for a solution for this, it seems the actual cursor change occurs here:<br><br><b>$LAZHOME/lcl/interfaces/gtk/gtkwinapi.inc (function TGtkWidgetSet.SetCursor)</b><br><br>Am I correct? The function SetCursor() has a few internal functions.<br>
Why is there both a SetGlobalCursor() and a ResetGlobalCursor()?<br>SetGlobalCursor() seems to be more straightforward than ResetGlobalCursor().<br>In theory we could always use SetGlobalCursor(), even when it's the default, right?<br>
Maybe there's some extra stuff that need to be done when the cursor is crDefault?<br><br>If this code is correct, maybe the problem (assuming there's a problem) is in TGroupBox.<br>Maybe it's not being visited in that traversing loop at ResetGlobalCursor() for some reason.<br>
<br>PS: Should I add this to the bug report as a note?<br><br><div class="gmail_quote">2009/12/15 Alexsander Rosa <span dir="ltr"><<a href="mailto:alexsander.rosa@gmail.com">alexsander.rosa@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Screen.Cursor from INSIDE a TGroupBox fails<br><a href="http://bugs.freepascal.org/view.php?id=15351" target="_blank">http://bugs.freepascal.org/view.php?id=15351</a><br>
<br>1. Create a new project (on Linux Ubuntu 9.04)<br>
2. Place a TGroupBox anywhere<br>
3. Place a TButton inside the TGroupBox<br>
4. Copy the following code into TButton.Click<br>
<br><span style="font-family: courier new,monospace;">
Screen.Cursor := crSQLWait;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
Application.ProcessMessages;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
Sleep(1000);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
Screen.Cursor := crHourGlass;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
Application.ProcessMessages;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
Sleep(1000);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
Screen.Cursor := crDefault;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
Application.ProcessMessages;</span><br style="font-family: courier new,monospace;">
<br>
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.<br>
<br>PS: The bug report includes a complete example (small project).<br clear="all"><font color="#888888"><br></font></blockquote></div><br><br clear="all"><br>-- <br>Atenciosamente,<br>Alexsander da Rosa<br>Linux User #113925<br>
<br>"Extremismo na defesa da liberdade não é defeito.<br>Moderação na busca por justiça não é virtude."<br>-- Barry Goldwater<br>