# Add and clear widgets in editor viewport?

**URL:** <https://forums.unrealengine.com/t/add-and-clear-widgets-in-editor-viewport/372896>\
**Category:** UI\
**Tags:** unreal-engine, editor, slate, UI, Widget, question\
**Created:** [October 9, 2016, 6:44pm UTC](https://forums.unrealengine.com/t/add-and-clear-widgets-in-editor-viewport/372896 "2016-10-09T18:44:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![antithing](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@antithing](https://forums.unrealengine.com/u/antithing)\
**Post date:** [October 9, 2016, 6:44pm UTC](https://forums.unrealengine.com/t/add-and-clear-widgets-in-editor-viewport/372896/1 "2016-10-09T18:44:43Z")

</div>

I am adding custom widgets as SOverlays to my editor viewport. Like this:

```
    FLevelEditorModule& LevelEditor = FModuleManager::GetModuleChecked<FLevelEditorModule>(TEXT("LevelEditor"));
    
    	TSharedPtr<ILevelViewport> LViewport = LevelEditor.GetFirstActiveViewport();
    
    	TSharedRef<SWidget> baseWidget = SNew(SOverlay)
    		+ SOverlay::Slot()
    		.VAlign(VAlign_Bottom)
    		.HAlign(HAlign_Fill)
    		[
    			//Colored Background
    			SNew(SBorder)
    			.Padding(FMargin(3))
    		// Image for BG
    		.BorderImage(&brushClr)

	[
		// Text Rec
		SNew(STextBlock)
		.Justification(ETextJustify::Right)
	.Text(RecHUDText)
	.Margin(15)
	.ColorAndOpacity(FLinearColor::Red)
	.Font(FSlateFontInfo("Veranda", 20))

];

```

If I put this on a tick, when the text content changes, rather than just replacing the text, it kind of fades out, leaving the old content behind the new content, and making it hard to read. Should I be clearing the widget each tick, then rebuilding it? How best to go about this?

Thanks!
