Strip Response .clicked() doesn't work. Bug or user error? #7326
Unanswered
MightyBurger
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
I did not test this a lot (looks like it prevents the widgets in the use egui_extras::{Size, StripBuilder};
let response = StripBuilder::new(ui)
.sense(egui::Sense::click())
.size(Size::remainder())
.horizontal(|mut strip| {
strip.cell(|ui| {
ui.label("Hello, world!");
});
});
let response = ui.interact(response.rect, response.id, Sense::click());
if response.clicked() {
println!("Click");
}
if response.hovered() {
println!("Hover");
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm working on a Windows egui app, but I am running into a little trouble. It feels like a bug, but it might just be me misunderstanding something. Hoping someone could offer clarification.
See this minimal example I made:
What I expect to see is:
Hoverspam in the terminal when the cursor is over the textClickin the terminal when I click on the textI only see
Hover, though, neverClick. Anyone know why?My main question is above. But just to avoid invoking the XY-problem, I'll explain what exactly I'm trying to do. Maybe somebody knows a better way to accomplish what I'm going after.
See the left table in this image, which uses

egui_extras::Table:Users can click on items in that table, and it opens up a new page.
It is important users can re-order the items in that table. To accomplish this, I've gone down the path of using egui_dnd and have pretty much re-implemented the basic functionality of an
egui_extras::Tableby displaying each row in aStrip. This is what it looks like (left table):It's definitely a WIP, but it all seems to work OK, except for this problem. Clicking on a table row doesn't do anything.
Note, I do invoke
Doing this doesn't seem to make a difference whether the bug occurs or not.
I am considering just doing something else at this point. Trying to perfectly match the appearance of an
egui_extras::TablewithStripsjust feels like a bad idea in some ways, so if someone has a better idea, it'd be appreciated.Beta Was this translation helpful? Give feedback.
All reactions