# Customize detail panel default

**URL:** <https://forums.unrealengine.com/t/customize-detail-panel-default/327741>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [August 5, 2015, 1:24pm UTC](https://forums.unrealengine.com/t/customize-detail-panel-default/327741 "2015-08-05T13:24:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MiniTurtle](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MiniTurtle](https://forums.unrealengine.com/u/MiniTurtle)\
**Post date:** [August 5, 2015, 1:24pm UTC](https://forums.unrealengine.com/t/customize-detail-panel-default/327741/1 "2015-08-05T13:24:28Z")

</div>

Hey,

So I am customizing my struct’s details panel but there is one variable that I want to appear as normal/default (as if I didn’t override CustomizeHeader).

The variable TWeakObjectPtr Doorway is the variable that should appear as default, with the object picker and everything.

How do I make it default?  
I know that TWeakObjectPtr uses SDetailSingleItemRow widget and FDetailItemNode creates that widget.

Here is some code if you like to see:

```
USTRUCT()
struct FDoorwayTeleport
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere)
	TWeakObjectPtr<class ADoorway> Doorway; // <--------- This should appear as normal/default

	UPROPERTY(EditAnywhere)
	FString OtherLevelName; // I want to customize these

	UPROPERTY(EditAnywhere)
	FString OtherLevelDoorwayID; // I want to customize these

	FDoorwayTeleport();
};

void FDoorwayTeleportCustomization::CustomizeHeader(TSharedRef<class IPropertyHandle> StructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils)
{
	uint32 NumChildren;
	StructPropertyHandle->GetNumChildren(NumChildren);

	for (uint32 ChildIndex = 0; ChildIndex < NumChildren; ++ChildIndex)
	{
		const TSharedRef< IPropertyHandle > ChildHandle = StructPropertyHandle->GetChildHandle(ChildIndex).ToSharedRef();

		if (ChildHandle->GetProperty()->GetName() == TEXT("Doorway"))
		{
			DoorwayHandle = ChildHandle;
		}
	}

    // How do I pass DoorwayHandle as default?
}
```

---

<div class="post-metadata">

**Author:** ![joeGraf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@joeGraf](https://forums.unrealengine.com/u/joeGraf)\
**Post date:** [August 5, 2015, 8:23pm UTC](https://forums.unrealengine.com/t/customize-detail-panel-default/327741/2 "2015-08-05T20:23:44Z")

</div>

I haven’t had to do this with a UStruct, but with something that is UObject derived, you can override PostInitProperties() to set a default value if it wasn’t set by the user

---

<div class="post-metadata">

**Author:** ![kamrann](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kamrann](https://forums.unrealengine.com/u/kamrann)\
**Post date:** [August 5, 2015, 8:45pm UTC](https://forums.unrealengine.com/t/customize-detail-panel-default/327741/3 "2015-08-05T20:45:00Z")

</div>

Are you intending to display it inline in the header, rather than in the drop down child area? In the child area it’s very easy, just call `IDetailChildrenBuilder::AddChildProperty(DoorwayHandle)`.

If you need it in the header, it’s not clear how exactly you want it to be positioned, but I guess something like this:

```
HeaderRow
  .NameContent()
  [
    StructPropertyHandle->CreatePropertyNameWidget()
  ]
  .ValueContent()
  [
    // You could use CreatePropertyNameWidget() here too and put them both into a box
    DoorwayHandle->CreatePropertyValueWidget()
  ];

```

If you need more control, look at `SProperty`. There’s some info [here](https://docs.unrealengine.com/latest/INT/Programming/Slate/DetailsCustomization/index.html).

---

<div class="post-metadata">

**Author:** ![MiniTurtle](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MiniTurtle](https://forums.unrealengine.com/u/MiniTurtle)\
**Post date:** [August 6, 2015, 4:17am UTC](https://forums.unrealengine.com/t/customize-detail-panel-default/327741/4 "2015-08-06T04:17:40Z")

</div>

That worked! Thank you
