-
Notifications
You must be signed in to change notification settings - Fork 449
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
Control.parent
property
#2906
Control.parent
property
#2906
Conversation
@@ -515,6 +516,8 @@ def _build_add_commands(self, indent=0, index=None, added_controls=None): | |||
indent=indent + 2, index=index, added_controls=added_controls | |||
) | |||
commands.extend(childCmd) | |||
# set the parent | |||
control.parent = self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That function where it's set is recursive, so control.parent
will be set to a top most control which update()
is called for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is your suggestion?
Resolved! Property works like a charm now - try the updated test code :) |
* initial commit * remove parent when unmounting * update parent typing * set parent when adding/replacing --------- Co-authored-by: Feodor Fitsner <feodor@appveyor.com>
Closes #952
None
) although they all live in thesameListView
.Test Code: