From 81fd0725d020e9f302c0d40fd5a5700d3dc871aa Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 6 Dec 2018 05:44:38 +0800 Subject: Done. --- src/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 6dad0679..1773ce84 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -132,7 +132,7 @@ int APIENTRY wWinMain( { const auto button = Button::Create(); button->GetLayoutParams()->padding = Thickness(20, 5); - button->AddChild(TextBlock::Create(L"Show popup window parenting this.")); + button->SetChild(TextBlock::Create(L"Show popup window parenting this.")); button->mouse_click_event.bubble.AddHandler([window, button](auto) { std::vector items; @@ -148,7 +148,7 @@ int APIENTRY wWinMain( { const auto button = Button::Create(); button->GetLayoutParams()->padding = Thickness(20, 5); - button->AddChild(TextBlock::Create(L"Show popup window parenting null.")); + button->SetChild(TextBlock::Create(L"Show popup window parenting null.")); button->SetBackgroundBrush(cru::graph::CreateSolidColorBrush(D2D1::ColorF(D2D1::ColorF::Gold))); button->mouse_click_event.bubble.AddHandler([](auto) { @@ -162,7 +162,7 @@ int APIENTRY wWinMain( { const auto button = Button::Create(); button->GetLayoutParams()->padding = Thickness(20, 5); - button->AddChild(TextBlock::Create(L"Show popup window with caption.")); + button->SetChild(TextBlock::Create(L"Show popup window with caption.")); button->mouse_click_event.bubble.AddHandler([](auto) { auto popup = Window::CreatePopup(nullptr, true); @@ -204,7 +204,7 @@ int APIENTRY wWinMain( L"Love myself I do. Not everything, but I love the good as well as the bad. I love my crazy lifestyle, and I love my hard discipline. I love my freedom of speech and the way my eyes get dark when I'm tired. I love that I have learned to trust people with my heart, even if it will get broken. I am proud of everything that I am and will become."); text_block->SetSelectable(true); - scroll_view->AddChild(text_block); + scroll_view->SetChild(text_block); layout->AddChild(scroll_view); } @@ -212,7 +212,7 @@ int APIENTRY wWinMain( layout->AddChild(CreateWithLayout(LayoutSideParams::Content(Alignment::End), LayoutSideParams::Stretch(), L"By crupest!!!")); - window->AddChild(layout); + window->SetChild(layout); /* window.AddChild( -- cgit v1.2.3