delphifiremonkeymouse-cursordelphi-12-athens

How do I change my mouse icon when I hover over a word on Delphi in FireMonkey?


How do I change the mouse icon when it hovers over a word and changes to another icon?

I have a word that is in a TLabel component. When I hover my mouse over it then I want the mouse icon to change to something else.

How can I do this?


Solution

  • Default Cursor Icons

    The TLabel has a Cursor property that allows you to change the mouse "icon". It only allows you to change it to one of the other default OS-level icons. So you can pick one of the following:


    And you can simply set this during design-time in the object inspector:

    Delphi Programming Object Inspector

    But you can also set it programmatically like this:

    Label1.Cursor := crHandPoint;