SEditableText has no border

In Slate code for Editor Plugin, I have two SAssignNew, but SEditableText after second SAssignNew does not have border and the background has a Gray color

why does SEditableText have no border and does not have a white background color?

In .h file



TSharedPtr< SEditableText > TextWidgetForCopy;



SAssignNew(ToolkitWidget, SBorder)
        .HAlign(HAlign_Left)  //  .HAlign(HAlign_Fill) // HAlign_Left  // .MaxWidth(90.0f) // .Padding(0, 60, 40, 10)  // .AutoHeight()    
        .Padding(25)
        .IsEnabled_Static(&Locals::IsWidgetEnabled)
        
            SNew(SVerticalBox)
            + SVerticalBox::Slot()
            .AutoHeight()           // .ColorAndOpacity(FLinearColor::White)
            .HAlign(HAlign_Center)
            .Padding(5)
            
                SNew(STextBlock)
                .AutoWrapText(true)
                .Text(LOCTEXT("HelperLabel", "Select Static Mesh and Actor with InstancedStaticMesh"))
            ]
            + SVerticalBox::Slot()
                .HAlign(HAlign_Left)
                .AutoHeight()
                
                    Locals::MakeButton(LOCTEXT("FirstButton", "Convert Static Mesh in Instance"), FVector(0, 0, Factor))
                ]
            + SVerticalBox::Slot()
                .HAlign(HAlign_Left)
                .AutoHeight()
                .Padding(20)
                
                    SNew(SHorizontalBox)
                    + SHorizontalBox::Slot()
                    .AutoWidth()
                    
                        SNew(SButton)
                        .Text(LOCTEXT("LeftButtonLabel", "Clone Static mesh"))
                        .OnClicked(this, &FeditorModeEdModeToolkit::OnButtonClick2)
                    ]
                    + SHorizontalBox::Slot()
                        .AutoWidth()
                        .Padding(20, 0, 20, 0)
                        
                            SNew(STextBlock)
                            .Text(FText::FromString("number of copies"))
                        ]
                    + SHorizontalBox::Slot()
                        .AutoWidth()
                        .HAlign(HAlign_Left)
                        
                            SAssignNew(TextWidgetForCopy, SEditableText)
                            .Text(LOCTEXT("numCopy", "10"))
                            .OnTextChanged(this, &FeditorModeEdModeToolkit::OnChatTextChanged)
                            .ColorAndOpacity(FLinearColor(1.f, 1.f, 1.f, 0.9f))

                        ]
                    + SHorizontalBox::Slot()
....


does this code reset the styles? How can I set style for SEditableText ?



SAssignNew(TextWidgetForCopy, SEditableText)


Try to set a background with alpha 1.f:



SNew(SEditableTextBox)
                    .IsReadOnly(false)
                    .Text(FText::FromString(Column))
                    .BackgroundColor(FSlateColor(FLinearColor(0.5f,0.5f,0.5f)))
                    .Font(FEditorStyle::GetFontStyle(TEXT("BoldFont")))


You propose to use SNew instead of SAssignNew. But I need access to the function GetText () from the class SEditableText. I need the GetText () function for SEditableText. And I do not know how to get access to this function without SAssignNew. If I use .BackgroundColor (FSlateColor (FLinearColor (0.5f, 0.5f, 0.5f))) so


SAssignNew (TextWidgetForCopy, SEditableText)
.Text (LOCTEXT ("numCopy", "10"))
.OnTextChanged (this, & FeditorModeEdModeToolkit :: OnChatTextChanged)
.ColorAndOpacity (FLinearColor (1.f, 1.f, 1.f, 0.9f))
.BackgroundColor (FSlateColor (FLinearColor (0.5f, 0.5f, 0.5f))))

The compiler reports a C2039 error: .BackgroundColor is not a member of SEditableText::FArguments

You are using “SEditableText” class…
That has no SBorder widget.

use TextBox instead.

You should use “SEditableTextBox” instread of “SEditableText”, here is the difference between these two widgets. Wish help to you.