diff --git a/examples/text-field/edit-layout-impl.cpp b/examples/text-field/edit-layout-impl.cpp index 16e8146..f87550b 100644 --- a/examples/text-field/edit-layout-impl.cpp +++ b/examples/text-field/edit-layout-impl.cpp @@ -94,6 +94,8 @@ void EditLayout::OnRelayout( const Vector2& size, ActorSizeContainer& container float height = mTopPanel.GetHeightForWidth( panelWidth ); + mTopPanel.SetSize( Vector2(panelWidth, height) ); + container.push_back( ActorSizePair( mTopPanel, Vector2(panelWidth, height) ) ); } } diff --git a/examples/text-field/text-field-example.cpp b/examples/text-field/text-field-example.cpp index 1ee882d..9940514 100644 --- a/examples/text-field/text-field-example.cpp +++ b/examples/text-field/text-field-example.cpp @@ -78,11 +78,10 @@ public: field.SetBackgroundColor( Color::BLACK ); layout.SetTopPanel( field ); - field.SetProperty( TextField::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" ); + field.SetProperty( TextField::Property::TEXT, "Hello" ); - // TODO - //Property::Value fieldText = field.GetProperty( TextField::Property::TEXT ); - //std::cout << "Got text from field: " << fieldText.Get< std::string >() << std::endl; + Property::Value fieldText = field.GetProperty( TextField::Property::TEXT ); + std::cout << "Displaying text: " << fieldText.Get< std::string >() << std::endl; } /**