aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-11-07 18:54:41 +0800
committercrupest <crupest@outlook.com>2018-11-07 18:54:41 +0800
commit2b5b89e9483063f3af05fb5485043868d447994b (patch)
treeafb0bff66420d0a631416149142549adb5c45dc2 /src/main.cpp
parent9f7de7f0775b86e3c82d4c5e3427a6f2fd98810b (diff)
downloadcru-2b5b89e9483063f3af05fb5485043868d447994b.tar.gz
cru-2b5b89e9483063f3af05fb5485043868d447994b.tar.bz2
cru-2b5b89e9483063f3af05fb5485043868d447994b.zip
Add min max.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a15fa4da..5fd59ede 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -129,6 +129,13 @@ int APIENTRY wWinMain(
}
{
+ const auto text_box = TextBox::Create();
+ text_box->GetLayoutParams()->width.min = 50.0f;
+ text_box->GetLayoutParams()->width.max = 100.0f;
+ layout->AddChild(text_box);
+ }
+
+ {
const auto text_block = CreateWithLayout<TextBlock>(LayoutSideParams::Stretch(), LayoutSideParams::Stretch(), L"This is a very very very very very long sentence!!!");
text_block->SetSelectable(true);
layout->AddChild(text_block);