window resize event

Is there a way to get an event when the user resizes the screen?

I want a menu (mainly consisting of DirectGui elements) in the top left corner of the screen. It should stay there even if the user resizes the window.
I could recalculate and reposition the elements based on the new windows size I guess.

I tried to reparent everything to render2D. For my purposes this would have been ok, since the aspect of the buttons doesn’t matter too much. Looked “good enough” anyway.
But the manual says that’s not the right way to do this. Do I worry if I would put lots of work in it just to find out later that there are more problems with this approach.

Another alternative i was thinking about is using a second window (maybe with gui elements from a crossplatform widget set like tk)
Is there any sample code doing something like this? Which widget set would be recommended?

Yes, listen for “window-event”. Theres also an “aspectRatioChanged” event, I think.

However, in your case you might want to reparent to base.a2dTopLeft.

Thanks, that will help…

Is it just me or is the documentation missing a few points? :slight_smile:
I’m missing many points that seem important, especially to new programmers. Like for example a complete list of events I can get from the system.

I got some mouse events from the Panda sources.
Now I just checked against aspectRatioChanged and found, that there is a method messenger.send used in many places.
Can I intercept all those events? Are there more events generated by th C souces as well?