Discussion:
Restrictions on icons?
Cees De Groot
2006-07-19 15:18:02 UTC
Permalink
We are polishing the L&F of our app, one of the things is to replace
the window icon (WxTopLevelFrame>>setIcon).

The old icon was a simple xpm, the new one a nice shiny png. Both are
32x32, but nevertheless nothing shows when using the new icon (using
"WxIcon fromImage: (WxImage ....)").

Are there any restrictions on what is acceptable?

TIA,

Cees
Rob Gayvert
2006-07-19 15:18:02 UTC
Permalink
Post by Cees De Groot
We are polishing the L&F of our app, one of the things is to replace
the window icon (WxTopLevelFrame>>setIcon).
The old icon was a simple xpm, the new one a nice shiny png. Both are
32x32, but nevertheless nothing shows when using the new icon (using
"WxIcon fromImage: (WxImage ....)").
Are there any restrictions on what is acceptable?
Not according to the docs, but I just tried a png your way, and got
nothing. Try using something like

aBitmap := WxBitmap fromImageFile: path.
anIcon := WxIcon new.
anIcon copyFromBitmap: aBitmap.

For some reason, this seems to work better.

.. Rob
Cees De Groot
2006-07-19 15:18:02 UTC
Permalink
Post by Rob Gayvert
aBitmap := WxBitmap fromImageFile: path.
anIcon := WxIcon new.
anIcon copyFromBitmap: aBitmap.
For some reason, this seems to work better.
Better, but not perfect - my particular Icon (attached) does render
this way, but mangled...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kolibri.png
Type: image/png
Size: 673 bytes
Desc: not available
Url : Loading Image...
Loading...