traits app icon

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

traits app icon

Yohann Morille
Hi !

is there a way to choose an icon to be displayed in the taskbar and/or in the title bar when my traits application is running ?
For example, we can take this example : http://docs.enthought.com/mayavi/mayavi/auto/example_mayavi_traits_ui.html

Y.



_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: traits app icon

Gary Ruben-2
Hi Yohann,
Here's how you can create it for the titlebar of the window, but I'm not
sure about the taskbar:

1. Create an application icon as a .ico file (The Gimp will save an
image in this format)
2. import ImageResource
3. set the icon parameter in the View


In that example, if I have a file app_icon.ico in the same directory as
the application,

from pyface.api import ImageResource

...

     view = View(HSplit(VSplit(Item(name='engine_view',
                 ...
                         ),
                 resizable=True,
                 icon=ImageResource('app_icon.ico'),
                 scrollable=True
                 )


HTH,
Gary


On 14/06/2013 6:28 AM, Yohann Morille wrote:
> Hi !
>
> is there a way to choose an icon to be displayed in the taskbar and/or
> in the title bar when my traits application is running ?
> For example, we can take this example :
> http://docs.enthought.com/mayavi/mayavi/auto/example_mayavi_traits_ui.html
>
> Y.
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev