pub fn band(
ui: &mut Ui,
id_salt: impl Hash + Debug,
title: &str,
count: Option<u64>,
open: bool,
) -> ResponseExpand description
One band standing alone, in the look of a section’s: the disclosure
mark, the title, the count, for a fold that is not a stack of
sections (a card’s “More (n)” row, a group in a form). A click, or
Space or Enter while it has the keyboard, toggles it: the caller
flips open when the response is clicked(). It is a button named
by its title and count (“More, 3”), expanded or not for assistive
technology. It takes the width available and a band’s height.
let ctx = egui::Context::default();
let mut open = false;
let mut out = ctx.run_ui(Default::default(), |ui| {
if egui_pop_core::sections::band(ui, "more", "More", Some(3), open).clicked() {
open = !open;
}
});