egui
egui copied to clipboard
How to copy the text?
ScrollArea::vertical().auto_shrink([false; 2]).show_rows(
ui,
row_height,
num_rows,
|ui, row_range| {
for row in row_range {
if row == 0 {
ui.columns(3, |columns| {
columns[0].label("Desc");
columns[1].label("Account");
columns[2].label("Password");
});
} else {
if row - 1 >= self.data.len() {
break;
}
let col = &self.data[row - 1];
ui.columns(3, |columns| {
columns[0].label(&col[0]);
columns[1].label(&col[1]);
columns[2].label(&col[2]);
});
}
}
},
);
how to copy the text in the columns?
Maybe it's good idea to just take a look at font book
on demo example, if you click the emoji symbol it will be automatically copied to the clipboard.
it is a little bit different, I want to drag the cursor to select text in the column.
I have the same question how to copy text from text_edit ?
I even tried like this, but does not work:
if ui.text_edit_singleline(link_to_profile).clicked() { ui.output().copied_text = link_to_profile.to_string(); }
Any ideas how to copy text CTRL + C on text edit?
Would like this feature as well.
Unless something changed since the last answer in this thread Selecting (label) text with a mouse and copying it has not been implemented yet.
This has been implemented in #3814 and #3870, so I think this issue can be closed.