add a method to show caret for the uneditable textbox
When an uneditable textbox has a caret, user can select the text and copy it.
This commit is contained in:
@@ -415,7 +415,16 @@ namespace drawerbase {
|
||||
internal_scope_guard lock;
|
||||
auto editor = get_drawer_trigger().editor();
|
||||
if(editor)
|
||||
editor->editable(able);
|
||||
editor->editable(able, false);
|
||||
return *this;
|
||||
}
|
||||
|
||||
textbox& textbox::enable_caret()
|
||||
{
|
||||
internal_scope_guard lock;
|
||||
auto editor = get_drawer_trigger().editor();
|
||||
if (editor)
|
||||
editor->editable(editor->attr().editable, true);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user