UB1EditTextBlockWidget
Overview
- EditTextBlock Component Widget UB1MultiLineEditableTextBox wrapper component with line-based height control. Design: 1. Composition - embed in other widgets (forms, popups, settings) 2. Unified API - SetText/GetText/SetHintText/SetLineCount 3. Event-driven - delegates only, no business logic 4. Line-based height - (FontSize + Offset) * Lines Usage:
cpp void UMyFormWidget::NativeOnInitialized() { Super::NativeOnInitialized(); BW_EditTextBlock->OnTextChangedEvent.AddDynamic(this, &ThisClass::OnNameChanged); } void UMyFormWidget::RefreshData() { BW_EditTextBlock->SetHintText(NSLOCTEXT("MyForm", "NameHint", "Enter name...")); BW_EditTextBlock->SetText(FText::FromString(CurrentName)); BW_EditTextBlock->SetLineCount(3); }
Metadata
| Field | Value |
|---|---|
| Kind | class |
| Environment | B1 - Presentation |
| Category | classes |
| Extends | UB1UserWidgetBase |
Properties (7)
| Name | Type | Description |
|---|---|---|
BW_EditableTextBox | any | |
BW_SizeBox | any | |
LineCount | integer | |
MaxLength | integer | |
OnTextChangedEvent | FOnTextChangedEvent | |
OnTextCommittedEvent | FOnTextCommittedEvent | |
WrapTextAt | number |
Functions (8)
| Function | Parameters | Returns | Description |
|---|---|---|---|
GetText | - | string | Returns Text. |
OnTextChanged | InText: string | - | Callback invoked on Text Changed. |
OnTextCommitted | InText: string, InCommitType: ETextCommit | - | Callback invoked on Text Committed. |
SetHintText | InText: string | - | Sets Hint Text. |
SetLineCount | InLineCount: integer | - | Sets Line Count. |
SetMaxLength | InMaxLength: integer | - | Sets Max Length. |
SetText | InText: string | - | Sets Text. |
SetWrapTextAt | InWrapTextAt: number | - | Sets Wrap Text At. |