Skip to content

Is there any way to respond to the Window Resized Event under eframe? #4844

Discussion options

You must be logged in to vote

Finally, I achieved this goal by monitoring the size of an arbitary drawing rect, e.g.

let current_size = ui.available_size();    //  or some other rect's size

if self.cached_size != current_size {
    self.is_size_changed= true;
    self.cached_size = current_size ;
}

if self.is_size_changed {
    // TODO: Make response here
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wangxiaochuTHU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant