[Gambas-devel] Custom Cursors

Nigel Gerrard nigel at ...2...
Thu Jan 15 22:51:15 CET 2004


Hello Benoît.

I noticed recently that there was a request for the ability to set the cursor to a user defined bitmap instead of the standard set.  You indicated that this would not be high on your list of todo.  Hopefully I can help.

Attached is a new METHOD for the Widget class.

The syntax for MouseIcon is:

.MouseIcon("ImageMap"[,HotspotX, HotspotY, "BitMask"])

I have tested using 32x32 bit .png, .xpm and .xbm.  It is important that the bits are either black or white.
If the BitMask is not given, the ImageMap is also used as the BitMap which means that the Icon will be
completely transparent (containing no white.)

If this is not quite what you were looking for, give me a clue and I'll have another attempt.

All the best

Nigel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20040115/f63f97e3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Cursor.tar.gz
Type: application/x-gzip
Size: 2902 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20040115/f63f97e3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Cursor.diff.tar.gz
Type: application/x-gzip
Size: 1959 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20040115/f63f97e3/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NOTE.Cursor
Type: application/octet-stream
Size: 317 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20040115/f63f97e3/attachment.obj>


More information about the Devel mailing list