----



then give it Filename instance :

Filename('yourFilename.ext')

import Filename from PandaModules (pandaexpress)


loadPrcFileData('','''
icon-filename yourIcon.ico
window-title Space Flight
''')
import direct.directbase.DirectStart

if couldn’t be loaded, perhaps it’s corrupted or inside other dir.

so is it in the same dir as your .py ?


Are you running on Windows? The icon filename is not supported on Linux or OSX.

David

Ah, now that I look more closely, changing the icon on an already opened window is not supported either, even on Windows. You have to specify the icon at the time the window is opened.

David


could you clarify this, please? i’m having the same sort of trouble. the following code runs fine under windows:

        props = WindowProperties.getDefault()
        self.__winOrigin = (props.getXOrigin(),props.getYOrigin())
        props = base.win.getProperties()
        props.setOrigin(*self.__winOrigin)

but fails on the mac os complaining about this very same thing:

What is the difference between WindowProperties and WindowProperties()?

oh. like this, i guess:

i should read first. this explains it, as the mac os installation is a very recent checkout of the code, while the windows stuff is binary 1.3.2.

thanks, previous posters!