On Sat, 1 Apr 2006 13:46:40 +0200
"Marien van Westen" <[EMAIL PROTECTED]> wrote:

> I have made the following changes to set the cursor for a TShape component
> The TSape cursor now can be changed not only in win32, but also on Linux
> (tested with Ubuntu)
> 
> Changes in ExtCtrls.pas
> ***************
> *** 329,334 ****
> --- 329,337 ----
>       FPen: TPen;
>       FBrush: TBrush;
>       FShape: TShapeType;
> +          FtmpCursor : TCursor;
> +          procedure MouseLeave;  override;
> +          procedure MouseEnter; override;
>       procedure SetBrush(Value: TBrush);
>       procedure SetPen(Value: TPen);
>       procedure SetShape(Value: TShapeType);
> 
> 
> Changes in shape.inc
> ***************
> *** 104,109 ****
> --- 104,122 ----
>     end;
>   end;
> 
> + procedure TShape.MouseLeave;
> +  begin
> +    Parent.Cursor:=FTmpCursor;
> +    inherited MouseLeave;
> + end;
> +
> + procedure TShape.MouseEnter;
> +  begin
> +    inherited MouseEnter;
> +    FTmpCursor:=Parent.Cursor;
> +    Parent.Cursor:=Self.Cursor;
> + end;
> +
> 
> I hope this patch will be usefull

Thanks. But this does not work in some cases.
For example then the user moves the mouse in the designer over a TShape and
user saves.

Mattias

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

Reply via email to