Skip to content

How MinSize() is used in WidgetRenderer(), where is it called from? #5513

Answered by andydotxyz
nagylzs asked this question in Q&A
Discussion options

You must be logged in to vote

But I don't see how the renderer is related to the widget, after the renderer has been created. A widget can be asked to create a new renderer, but a renderer cannot tell its widget (by its interface), and a widget cannot tell if it already created a renderer.

Correct, the renderer is managed in our drivers - a widget should not care if it has created a renderer - there may be more than one created during the lifecycle of a widget. However a renderer can know about the widget it renders (most have to!) by passing the widget into the renderer instance you create (assuming it is a custom renderer).

I'm missing a piece here: there must be a component or code that keeps a reference to both…

Replies: 9 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by nagylzs
Comment options

You must be logged in to vote
1 reply
@andydotxyz
Comment options

Comment options

You must be logged in to vote
1 reply
@andydotxyz
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@andydotxyz
Comment options

Comment options

You must be logged in to vote
1 reply
@andydotxyz
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@andydotxyz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants