[Gambas-user] Custom mouse cursor

Francis Payne roseking at ...3413...
Thu Dec 18 22:48:08 CET 2014


On 12/18/2014 11:37 PM, Tobias Boege wrote:

Thanks for that. Yes, I was using the word "property" a bit loosely =
but it was the

myLabel.Cursor = New Cursor(Picture["icon:/32/apply"])

bit that I couldn't grasp. Thank you for the prompt response.


> On Thu, 18 Dec 2014, Francis Payne wrote:
>>
>> Hi all - I note that the online documentation mentions that the Mouse
>> property of a component can be "custom", as in the example given :
>>
>> Const custom as integer = -2
>>
>>
>> The Properties panel in the IDE doesn't list 'Custom', however, at least
>> not in Gambas 3.5.2
>>
>> Is the Custom property still available ? If so, how do you attach the
>> custom cursor to a component ?
>>
> One can see from what you quoted above, that Custom never was a property. It
> is a *constant* which you need to assign to the Control.Mouse property in
> order to enable a custom cursor. You then use the Control.Cursor property to
> define it, e.g. (not tested!)
>
>   Public Sub Form_Open()
>     myLabel.Mouse = Mouse.Custom
>     myLabel.Cursor = New Cursor(Picture["icon:/32/apply"])
>   End
>
> when myLabel is a Label on your form.
>
> Regards,
> Tobi
>





More information about the User mailing list