-
I am making a console window. At the moment its a Window>ScrollArea>TextEdit. I have most of it working but I cant see how to prevent the TextEdit forcing the Window to grow vertically as the user types, or the system responds. The scroll bar does not kick in until the window has grown a lot. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Sounds like you want |
Beta Was this translation helpful? Give feedback.
-
It seems to work fine if I add a egui/crates/egui_demo_lib/src/demo/tests/window_resize_test.rs Lines 74 to 82 in cd1e4c5 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.");
ScrollArea::vertical().show(ui, |ui| {
ui.add_sized(ui.available_size(), TextEdit::multiline(&mut self.text));
});
}); Screencast.from.2024-07-07.21-48-32.mp4 |
Beta Was this translation helpful? Give feedback.
It seems to work fine if I add a
ScrollArea
to this example:egui/crates/egui_demo_lib/src/demo/tests/window_resize_test.rs
Lines 74 to 82 in cd1e4c5