Skip to content

Commit

Permalink
set browser trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
MoAlyousef committed Jun 9, 2024
1 parent bc9dd3d commit 966229c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/flglyph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use flemish::{
app,
button::Button,
color_themes,
enums::{FrameType, Font},
enums::{CallbackTrigger, FrameType, Font},
frame::Frame,
browser::{Browser, BrowserType},
group::Flex,
Expand Down Expand Up @@ -114,6 +114,7 @@ impl Sandbox for Model {

fn browser(tooltip: &str, value: Model) -> Browser {
let mut element = Browser::default().with_type(BrowserType::Hold);
element.set_trigger(CallbackTrigger::Changed);
element.set_tooltip(tooltip);
element.set_label_font(Font::Zapfdingbats);
element.set_text_size(16);
Expand All @@ -122,6 +123,7 @@ fn browser(tooltip: &str, value: Model) -> Browser {
element.add(&item.to_string());
}
element.select(value.curr as i32 + 1);
element.top_line(value.curr as i32 + 1);
}
element
}
Expand Down

0 comments on commit 966229c

Please sign in to comment.