You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm failing to make 'hover text' (aka tooltip) appear when hovering over a combo box that is created inside an add_enabled_ui closure.
let have_selection = self.selection.is_some();let have_phases = !self.phases.is_empty();
ui.add_enabled_ui(have_phases, |ui|{
egui::ComboBox::from_id_salt(ui.id().with("phase_selection")).selected_text(match&self.selected_phase{Some(phase) => format!("{}", phase),None => tr!("form-common-choice-phase"),}).show_ui(ui, |ui| {for phase in&self.phases{if ui
.add(egui::Button::selectable(matches!(&self.selected_phase,Some(selection)if selection.eq(&phase.phase_reference)),format!("{}", phase.phase_reference),)).clicked(){self.component.sender.send(PlacementsTabUiCommand::PhaseChanged(phase.phase_reference.clone())).expect("sent");}}});}).response// FIXME the `on_hover_text` does not work, no tooltip appears when hovering over an ENABLED combobox.// the `on_disabled_hover_text` DOES work though..on_hover_text(if have_selection {tr!("project-placements-tab-phase-hover-text-with-selection")}else{tr!("project-placements-tab-phase-hover-text-no-selection")}).on_disabled_hover_text(tr!("project-placements-tab-phase-hover-text-no-phases"));
As per the FIXME in the code above, when the combo box is ENABLED, NO hover text appears when hovering over the widget.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm failing to make 'hover text' (aka tooltip) appear when hovering over a combo box that is created inside an
add_enabled_ui
closure.As per the FIXME in the code above, when the combo box is ENABLED, NO hover text appears when hovering over the widget.
Video:
Recording.2025-09-18.171843.mp4
What am I doing wrong, or is it broken?
Beta Was this translation helpful? Give feedback.
All reactions