window properties question

Hello everyone,

For the window Properties I’ve got this code so far,

WindowProperties props = WindowProperties( );
props.set_fixed_size( true );
props.set_cursor_hidden( true );
...

but now, how do I do the requestProperties in C++?

Thanks for your help.

Same way you do it in Python:

win->get_graphics_window()->request_properties(props);

Note that your line:

WindowProperties props = WindowProperties( );

is technically legal C++ syntax, but is a little weird; it looks like you copied verbatim from the equivalent Python syntax. In C++, you would normally write this just:

WindowProperties props;

Also note that fixed_size is not a property you can change on a window on the fly. You have to specify this property at the time of window creation instead. You can do this by passing your desired WindowProperties structure to the framework->open_window() call, but in this case you should probably start with a WindowProperties::get_default(), to pick up the size settings from your config file.

David

thank you very much, this works perfectly.

And I set the size of the window within the programm on the start because it should only have one size and never be resizeable. So there shouldn’t be any problems with the fixed_size.