How to Change the Name of a Pygame window?

Refer to http://www.pygame.org/docs/ref/display.html#pygame.display.set_caption:

set_caption(title, icontitle=None) -> None

If the display has a window title, this function will change the name on the window. Some systems support an alternate shorter title to be used for minimized displays.

Your usage was correct, so there must be another issue. Either your window is initialized incorrectly, or it isn't even initialized at all. Contributing your code would be helpful.


Call it after init().

pygame.init()
pygame.display.set_caption('test caption')

Tags:

Python

Pygame