-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion failure when programmatically resizing a window when ekWINDOW_RESIZE is not set. #158
Comments
Not really. This guard is there to prevent misuse of the SDK.
Ultimately, it's a bottom-up strategy. Here https://nappgui.com/en/gui/layout.html you have more info. When you create resizable windows the steps are the same but, in addition, you have to define how the columns/rows of the layout will be resized (by default proportionally). |
I think I understand, but in my case, all i have is a window, a panel, a layout, and a view. How should I set the size of the non-resizable window? Calling |
It must work
|
I see, there is a hidden rule in the API. This doesn't work, the window will have the wrong size: layout_view(...);
panel_layout(...);
window_panel(...);
view_size(...); But this does work: layout_view(...);
view_size(...);
panel_layout(...);
window_panel(...); So I assume it is not possible to change the view size at runtime, and have the window automatically resize itself to accommodate it, but this is OK for me. |
Effectively. When you call to You have shortcuts to update content: all of them have the same effect: Recompute the window and children dimensions. |
Its a good point to improve the documentation |
I see, thank you for the help! |
The
window_size
implementation currently performs this cassert:I want to be able to create a window which cannot be resized by the end-user (i.e. they cannot drag the edges of the window frame to resize it) but I still need to be able to set the window size programmatically, so removing this assert altogether would allow this.
Alternatively, perhaps there could be a way to remove the
ekWINDOW_RESIZE
flag after creating it and setting the size, to disallow resizing by the user, but I assume that would be more difficult to implement.The text was updated successfully, but these errors were encountered: