summaryrefslogtreecommitdiffstats
path: root/views/examples
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-12 19:03:58 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-12 19:03:58 +0000
commit092e313cfbb597c4be2336befbf2216769ec496e (patch)
treed74a8b166be95e87279131e18ba2a5bf05247947 /views/examples
parent02d9be518c123b4521034fd76132e06117129b39 (diff)
downloadchromium_src-092e313cfbb597c4be2336befbf2216769ec496e.zip
chromium_src-092e313cfbb597c4be2336befbf2216769ec496e.tar.gz
chromium_src-092e313cfbb597c4be2336befbf2216769ec496e.tar.bz2
AppendText was appending twice due to bad merge happened in the past.
Added append scenario to view_examples BUG=None TEST=run unit_tests and verify with view_examples. Review URL: http://codereview.chromium.org/271055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28724 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/examples')
-rw-r--r--views/examples/textfield_example.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/views/examples/textfield_example.h b/views/examples/textfield_example.h
index ec7c625..2feed4f 100644
--- a/views/examples/textfield_example.h
+++ b/views/examples/textfield_example.h
@@ -26,7 +26,8 @@ class TextfieldExample : protected ExampleBase,
name_(new Textfield()),
password_(new Textfield(Textfield::STYLE_PASSWORD)),
show_password_(new views::TextButton(this, L"Show password")),
- clear_all_(new views::TextButton(this, L"Clear All")) {
+ clear_all_(new views::TextButton(this, L"Clear All")),
+ append_(new views::TextButton(this, L"Append")) {
name_->SetController(this);
password_->SetController(this);
@@ -50,6 +51,8 @@ class TextfieldExample : protected ExampleBase,
layout->AddView(show_password_);
layout->StartRow(0, 0);
layout->AddView(clear_all_);
+ layout->StartRow(0, 0);
+ layout->AddView(append_);
}
virtual ~TextfieldExample() {}
@@ -81,6 +84,8 @@ class TextfieldExample : protected ExampleBase,
string16 empty;
name_->SetText(empty);
password_->SetText(empty);
+ } else if (sender == append_) {
+ name_->AppendText(WideToUTF16(L"[append]"));
}
}
@@ -91,6 +96,7 @@ class TextfieldExample : protected ExampleBase,
// Buttons to show password text and to clear the textfields.
views::TextButton* show_password_;
views::TextButton* clear_all_;
+ views::TextButton* append_;
DISALLOW_COPY_AND_ASSIGN(TextfieldExample);
};