Textbox should select its contents when focus is set. the caret position is moved to end of a line in that case.

When textbox is not focused, its selection should not be drawn to make it look quiet.
This commit is contained in:
beru
2015-05-21 03:42:17 +09:00
parent 4289446216
commit 9fc7d3e403
2 changed files with 7 additions and 3 deletions

View File

@@ -89,7 +89,10 @@ namespace drawerbase {
void drawer::focus(graph_reference graph, const arg_focus& arg)
{
refresh(graph);
if (arg.getting) {
editor_->select(true);
editor_->move_caret_end();
}
editor_->show_caret(arg.getting);
editor_->reset_caret();
API::lazy_refresh();