Skip to content

how do I make a TextEdit in a Window that a user can resize but does ot resize itself. #4799

Closed Answered by YgorSouza
pm100 asked this question in Q&A
Discussion options

You must be logged in to vote

It seems to work fine if I add a ScrollArea to this example:

Window::new("↔ resizable with TextEdit")
.open(open)
.vscroll(false)
.resizable(true)
.default_height(300.0)
.show(ctx, |ui| {
ui.label("Shows how you can fill an area with a widget.");
ui.add_sized(ui.available_size(), TextEdit::multiline(&mut self.text));
});

        Window::new("↔ resizable with TextEdit")
            .open(open)
            .vscroll(false)
            .resizable(true)
            .default_height(300.0)
            .show(ctx, |ui| {
                ui.label("Shows …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@pm100
Comment options

@YgorSouza
Comment options

@pm100
Comment options

@YgorSouza
Comment options

Answer selected by pm100
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