Hi
I'm working with Peter Gannon and Adriaan Van Os on a music app that
was ported from Delphi2006 to PC Lazarus, and then ported into a
Carbon Lazarus program compiling/debugging in XCode. We have worked
out most problems and we are mopping up a few remaining issues.
Overall it is working great except for a few niggling problems that
are likely bugs to fix in carbon LCL.
Have encountered two LCL cursor issues.
I fixed one minor cursor problem and will submit a change on that. A
couple of entries in the array that maps Laz cursor numbers into
AppearanceManager cursor numbers were wrong, so that setting
screen.cursor sometimes showed the wrong cursor.
Am trying to fix another cursor issue. Would like some more ideas
what to look for.
Setting screen.cursor seems to work fine.
Setting the Cursor property for TButtons and TComboBoxes causes the
proper cursor to appear when you move the mouse over it. Perhaps the
Cursor property works correctly for many other controls, but Buttons
and ComboBoxes are the only two I've verified.
However, setting the Cursor property at design-time for a TPaintBox
doesn't cause any visible cursor change when you move the mouse over
a TPaintBox. And setting a TPaintBox.cursor programmatically doesn't
do anything either. Since screen.cursor works, I could fudge our
desired behavior with Screen.cursor, but it would be nice to fix the
TPaintBox.
These TPaintBoxes are embedded in a TPanel, but maybe that isn't a
contributor to the bug, because the TButtons whose Cursors work
correctly, are embedded in TPanels too.
A TButton (which works), descends from TButtonControl which descends
from TWinControl which descends from TControl
A TPaintBox descends from TGraphicControl which descends from TControl.
TControl has a FCursor property and virtual SetTempCursor().
TWinControl inherits the TControl's FCursor, and overrides
SetTempCursor.
Debug-tracing thru the SetCursor code paths, it looks like a
TPaintBox passes thru some TWinControl code, unless XCode is playing
tricks on me. So maybe the different heritage of TControl versus
TGraphicControl is spurious. LCL is big, and maybe in practice
TWinDontrol and TControl work about the same because of some line I
haven't noticed.
Both the TButton that works, and the TPaintBox that doesn't work,
seem to pass thru a similar path on a SetCursor or MouseMove--
involving SetCursor, SetTempCursor. UpdateMousecursor.
So does anyone have some ideas on how better to zero-in on the
difference which prevents SetCursor from working on a TPaintBox?
Thanks.
jcjr
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives