-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
[DOC] How to set the size of a Widget ? #459
Comments
This is not the typical way to use enaml layout engine but you can specify the width and height as part of the constraints on the container which is the parent of your canvas as below (sizes are in pixel):
|
Yet I'd like to do I use the Then I don't want to prevent the user from resizing the parent Btw, thank for the hint. |
Setting the constraints can be done dynamically (be careful to no simply update the list in place though) and will get you what you want. You can access the canvas parent using the |
The problem is even a When I say I'd like to "resize" the canvas, it's only at the connection, then leave the user "unconstrained" to resize the window. The best would be to set a "constraint" on the canvas' ratio, so that when changing the |
I have a
MPLCanvas
I'd like to reshape at runtime and the whole parentWindow
to resize accordingly, how is it possible ?All what've found so far is
Window.set_size()
but I need theMPLCanvas
child to have a specific size instead.https://enaml.readthedocs.io/en/latest/api_ref/widgets/window.html?highlight=size#enaml.widgets.window.Window.set_size
The text was updated successfully, but these errors were encountered: