1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 14:20:04 -04:00

Add ui.group(|ui| { … }) to visually group some widgets within a frame

This commit is contained in:
Emil Ernerfeldt
2021-02-03 00:25:07 +01:00
parent ca886ea998
commit 829455b347
4 changed files with 9 additions and 5 deletions

View File

@@ -77,9 +77,7 @@ impl Widgets {
ui.label("Tooltips can be more than just simple text.")
.on_hover_ui(tooltip_ui);
egui::Frame::group(ui.style()).show(ui, |ui| {
ui.label("This is a group of widgets");
ui.group(|ui| {
ui.horizontal(|ui| {
ui.radio_value(&mut self.radio, Enum::First, "First");
ui.radio_value(&mut self.radio, Enum::Second, "Second");