Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: ui/views/examples/label_example.cc

Issue 2413223003: Views:: Make Labels support text selection. (Closed)
Patch Set: Rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/textfield/textfield_unittest.cc ('k') | ui/views/selection_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/label_example.cc
diff --git a/ui/views/examples/label_example.cc b/ui/views/examples/label_example.cc
index 9e651d1b785171f66cec55cad64cb477a7220057..4255e71679c88747698b89989ab2573d26977be9 100644
--- a/ui/views/examples/label_example.cc
+++ b/ui/views/examples/label_example.cc
@@ -115,6 +115,10 @@ void LabelExample::CreateExampleView(View* container) {
label->SetBorder(CreateSolidBorder(20, SK_ColorRED));
container->AddChildView(label);
+ label = new Label(ASCIIToUTF16("A label supporting text selection."));
+ label->SetSelectable(true);
+ container->AddChildView(label);
+
AddCustomLabel(container);
}
« no previous file with comments | « ui/views/controls/textfield/textfield_unittest.cc ('k') | ui/views/selection_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698