MCPcopy Create free account
hub / github.com/axmolengine/axmol / createTextBox

Method createTextBox

core/ui/UIEditBox/UIEditBoxImpl-winrt.cpp:110–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110Windows::UI::Xaml::Controls::Control EditBoxWinRT::createTextBox()
111{
112 auto textBox = TextBox();
113 textBox.BorderThickness(Windows::UI::Xaml::Thickness{0});
114 textBox.Name(EDIT_BOX_XAML_NAME);
115 textBox.Width(_size.Width);
116 textBox.Height(_size.Height);
117 textBox.Foreground(Media::SolidColorBrush(_color));
118 textBox.FontSize(_fontSize);
119 textBox.FontFamily(Media::FontFamily(_fontFamily));
120 textBox.MaxLength(_maxLength);
121 textBox.AcceptsReturn(_multiline);
122 textBox.TextWrapping(_multiline ? TextWrapping::Wrap : TextWrapping::NoWrap);
123 textBox.Text(_initialText);
124 setInputScope(textBox);
125 _setTextHorizontalAlignment(textBox);
126 _changeToken = textBox.TextChanged({get_weak(), &ax::ui::EditBoxWinRT::onTextChanged});
127 return textBox;
128}
129
130void EditBoxWinRT::onPasswordChanged(Windows::Foundation::IInspectable const& sender,
131 Windows::UI::Xaml::RoutedEventArgs const& args)

Callers

nothing calls this directly

Calls 4

WidthMethod · 0.80
HeightMethod · 0.80
NameMethod · 0.45
TextMethod · 0.45

Tested by

no test coverage detected