Adding comboboxes, date pickers and checkboxes to equi tables. #5559
Replies: 1 comment
-
Assuming you'll have more than one column, consider replacing struct Row {
selected: i32,
... other fields for other columns...
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I don't normally ask for help as I find I can sort out questions reading discussion topics/stackoverflow, tutorials etc. I am quite new to Rust and very new to egui. I have experience with MS Access, Java (Swing) and Java Servlets, JS etc. I have very much draft web based project that I am working on currently that is based around tabular data (using an editable HTML table) which draws data from multiple MySQL Databases and any non-system Tables in each database. For 'in cell' dropdowns and checkboxes I use a background image to mimic the presence of either. With the dropdown I have a custom HTML dropdown that binds to the clicked cell and stays in place when scrolling etc. With the checkbox I simply change classes when clicked or based on the MySQL data.
With egui I have been using and adapting standalone examples to try to understand the frameworks' capabilities. For example https://egui.info/examples/. I successfully added a egui table to egui-122-combobox but found, like the egui web table demo (clickbox) changing one cell changed all. Some I went back to egui-122-combobox and added a second combobox using a new variable name. That worked but this approach wouldn't work for a table with 10,000 rows with some columns based on widgets, especially as Rust seems to want all variables declared at compile time. I have pasted to main.rs file from my VSCode project below.
My question is, is there a way of adding multiple copies of the same widget to an egui table that doesn't involve defining lots of variables, e.g. like a CSS class or HTML ID? I'm not making a request for a change, I think you get inundated with these. I did try to search for a similar topic. I found one relating to ID's/labels but couldn't see how this was actioned. Many thanks for any assistance??
Code attached as text.
main.txt
Beta Was this translation helpful? Give feedback.
All reactions