Skip to content

About Widget Life Cycle (mount/unmount) #3376

Answered by Jacalz
iacore asked this question in Q&A
Discussion options

You must be logged in to vote

There is not really an API for that at the moment. A hack (not technically meant to be used in that way and not guaranteed to happen exactly at that time) the CreateRenderer method of the widget will be called more or less when it gets visible.

You can extend the widget and replace the CreateRenderer() method with your own (similar to https://developer.fyne.io/extend/extending-widgets). Just make sure that you return the result of the parent's CreateRenderer() method, otherwise it will not behave as expected (or not work at all).

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@iacore
Comment options

@Jacalz
Comment options

@PaulWaldo
Comment options

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