let text_edit = egui::TextEdit::singleline(&mut parameter.str_value)
.desired_width(50.0);
let output = text_edit.show(ui);
if output.response.double_clicked() {
// What to do here?
}
let mut text = String::new();
let mut output = egui::TextEdit::singleline(&mut text).show(ui);
output.state.set_ccursor_range(Some(CCursorRange::two(
CCursor::new(0),
CCursor::new(text.len()),
)));
1条答案
按热度按时间rkue9o1l1#
为了将来参考,您可以这样做以选择所有文本: