On Oct 5, 2007, at 2:57 AM, Paul Ishenin wrote:

James Chandler Jr wrote:

[skip]

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.

Is TPaintBox.Cursor works when it placed to form (without TPanel layer)?

Hi Paul

Thanks for the good debugging ideas.

After testing, TPaintBox.Cursor does not work when it is directly in a TForm. Whatever message is not being properly delegated, is not getting delegated down to a TForm either.

I also noticed that TLabel.Cursor also doesn't work, which makes sense since a TLabel also doesn't use a private canvas/handle.

So we might presume that any control without a private canvas, could have this same cursor bug?


A TButton (which works), descends from TButtonControl which descends from TWinControl which descends from TControl
> A TPaintBox descends from TGraphicControl which descends from TControl.

This is the big difference since TWinControl have own window handle while TGraphicControl do all job through its parent (wich must be TWinControl).

So TPaintBox trying to set it cursor through TPanel. Please check if TPanel.Cursor will work.

Please create bug tracker report for this problem with test application. This way you will give us ability to reproduce the same situation as you have.

TPanel.cursor seems to be working fine. On a test panel containing buttons, comboboxes and labels-- If the TPanel has a different cursor than default, and the buttons, combos, and labels have different cursors than default--

In that case, the TPanel cursor works fine, and the TPanel cursor also applies to any child control with a default cursor. Buttons and Comboboxes obediently change their cursor when you mouse over them, but Labels do not respond to a custom cursor setting.

I'm 'fairly familiar' with Delphi and some Mac Carbon, but not at all familiar with the LCL code. If you can think of some places to look, I may get lucky, fix and submit a fix without wasting some other developer's time. Maybe it is somewhere closer to the main message loop rather than higher up in the control code? Tracing thru the SetCursor code, I haven't hit many Carbon-specific functions. So perhaps the stuff that actually displays the cursor is somewhere else entirely?

If you can't think of some good places to look around, I'll just submit a bug report and example code.

Thanks very much!

jcjr

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to