Skip to content
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

Add Control.UpdateLayout() API #2382

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

cwensley
Copy link
Member

This adds the ability to update the control layout for platforms that use a deferred layout system such as Gtk, macOS, and Wpf.

This will ensure the control has had all of its layout applied so you can use its position and size right after this call.

Most platforms (except WinForms) use a deferred layout system so that after adding your control to the form dynamically it won't get laid out until the next idle loop.
This is useful when you need to know the dimensions of the control immediately.

Note that this can be an expensive operation, so it is recommended to only call this method when necessary and after all of the controls have been added/updated.

@cwensley cwensley added this to the 2.7.4 milestone Jan 24, 2023
@cwensley cwensley mentioned this pull request Jan 24, 2023
@cwensley cwensley merged commit b3e4821 into picoe:develop Jan 24, 2023
@cwensley cwensley deleted the curtis/control-update-layout branch January 24, 2023 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant