# Custom Detail Panel; Array indexed by strings

**URL:** <https://forums.unrealengine.com/t/custom-detail-panel-array-indexed-by-strings/330032>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [August 26, 2015, 9:37pm UTC](https://forums.unrealengine.com/t/custom-detail-panel-array-indexed-by-strings/330032 "2015-08-26T21:37:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![NullBlack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NullBlack](https://forums.unrealengine.com/u/NullBlack)\
**Post date:** [August 26, 2015, 9:37pm UTC](https://forums.unrealengine.com/t/custom-detail-panel-array-indexed-by-strings/330032/1 "2015-08-26T21:37:04Z")

</div>

I’d like to display an array of values, indexed by strings rather than numbers.  
IE: given an array int[] = {0,0,10} and FString[] = {“Alpha”,“Beta”,“Gamma”}  
Alpha [0]  
Beta [0]  
Gamma [10]

rather than  
0 [0]  
1 [0]  
2 [10]

I have looked at the “tutorials” on the wiki; I use quotes because I have yet to find one that _actually works_. Could someone please explain how to do this in a way that doesn’t assume I’m an Epic senior programmer who needs a refresher?

---

<div class="post-metadata">

**Author:** ![Devero](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Devero](https://forums.unrealengine.com/u/Devero)\
**Post date:** [August 26, 2015, 9:51pm UTC](https://forums.unrealengine.com/t/custom-detail-panel-array-indexed-by-strings/330032/2 "2015-08-26T21:51:47Z")

</div>

You could possibly use TMaps, check this out and see if it helps you.

> **[TMap](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/TMap/)**
>
> TMaps are primarily defined by two types — a key type and a value type — which are stored as associated pairs in the map.

---

<div class="post-metadata">

**Author:** ![NullBlack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NullBlack](https://forums.unrealengine.com/u/NullBlack)\
**Post date:** [August 26, 2015, 10:35pm UTC](https://forums.unrealengine.com/t/custom-detail-panel-array-indexed-by-strings/330032/3 "2015-08-26T22:35:10Z")

</div>

Problem is it renders that in a single bar  
[((Alpha, 0),(Beta, 0),(Gamma, 10))]  
rather than as a array. Also, adding new keys caused it to bug out, crashing the editor twice.

If anyone knows a way to get it to render vertically like an array, the crashing can probably be ignored as adding new keys won’t happen that frequently.

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [August 26, 2015, 11:32pm UTC](https://forums.unrealengine.com/t/custom-detail-panel-array-indexed-by-strings/330032/4 "2015-08-26T23:32:40Z")

</div>

Get Keys array with this function:

> **[GetKeys](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Core/Containers/TMapBase/GetKeys/)**
>
> Overload list

And the loop thru like this:

```
TArray<FString> Keys;

Map.GetKeys(Keys);

for(FString Key : Keys) {
      UE_LOG(LogTemp, Log, FText::FromString(Key + ": " + FString::FromInt(Map[Key]));
}

```

This is example on Logs, you can do anything

---

<div class="post-metadata">

**Author:** ![NullBlack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NullBlack](https://forums.unrealengine.com/u/NullBlack)\
**Post date:** [August 26, 2015, 11:36pm UTC](https://forums.unrealengine.com/t/custom-detail-panel-array-indexed-by-strings/330032/5 "2015-08-26T23:36:04Z")

</div>

If I wanted it in logs, I would have asked for logs. Look at the title: I want this in the **detail panel**.

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [August 27, 2015, 12:15am UTC](https://forums.unrealengine.com/t/custom-detail-panel-array-indexed-by-strings/330032/6 "2015-08-27T00:15:00Z")

</div>

Oh, thats quite not possible, currently reflection system does not support TMaps, only TArrays is supported from all container types. You might try to do something with this, but not sure if this will work:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

you definitly won’t be able to use TMaps in blueprints or else you make nodes to operate specific TMap in C++

TMap support for reflection system and bluepruints overall was requested few times and it’s considered to be implemented in future

---

<div class="post-metadata">

**Author:** ![NullBlack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NullBlack](https://forums.unrealengine.com/u/NullBlack)\
**Post date:** [August 27, 2015, 12:37am UTC](https://forums.unrealengine.com/t/custom-detail-panel-array-indexed-by-strings/330032/7 "2015-08-27T00:37:33Z")

</div>

Remember how I said the “tutorials” on the wiki don’t work? That one is a prime example. It’s out of date, incomplete, and doesn’t explain what it is doing.

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [August 27, 2015, 2:29am UTC](https://forums.unrealengine.com/t/custom-detail-panel-array-indexed-by-strings/330032/8 "2015-08-27T02:29:37Z")

</div>

Do you know how to use Slate? If not you should start with that. Im not sure if you can do anything here as TMap is non existant for reflection system

I will try to review that tutorial tommorow and some how hint what you could do

---

<div class="post-metadata">

**Author:** ![NullBlack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NullBlack](https://forums.unrealengine.com/u/NullBlack)\
**Post date:** [August 27, 2015, 2:37am UTC](https://forums.unrealengine.com/t/custom-detail-panel-array-indexed-by-strings/330032/9 "2015-08-27T02:37:18Z")

</div>

No. Do you have a Slate tutorial that actually explains what the FUNC it’s doing? What the functions actually do? _Because I couldn’t find one._

---

<div class="post-metadata">

**Author:** ![Devero](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Devero](https://forums.unrealengine.com/u/Devero)\
**Post date:** [August 27, 2015, 1:07pm UTC](https://forums.unrealengine.com/t/custom-detail-panel-array-indexed-by-strings/330032/10 "2015-08-27T13:07:54Z")

</div>

I remembered this training stream. It could be very useful, Also Noland is a guy to follow.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/1/71190dc019d2c1dab1665e2f4c4e3994f28f0253.jpeg "C++ Extending the Editor | Live Training | Unreal Engine") ](https://www.youtube.com/watch?v=zg_VstBxDi8)

Good luck!

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [August 27, 2015, 4:20pm UTC](https://forums.unrealengine.com/t/custom-detail-panel-array-indexed-by-strings/330032/11 "2015-08-27T16:20:33Z")

</div>

I’m afraid you might need to backward engineer it, by looksing on other code. I find out there whole module in engine dedcated to details property customization for various types

[https://github.com/EpicGames/UnrealEngine/tree/e607ba4d978c08a26e8e8e629dec0884bb161770/Engine/Source/Editor/DetailCustomizations](https://github.com/EpicGames/UnrealEngine/tree/e607ba4d978c08a26e8e8e629dec0884bb161770/Engine/Source/Editor/DetailCustomizations)

You can preform the same thing from any other module (including yours), you just need to remeber to manually register the customization as this module does

[https://github.com/EpicGames/UnrealEngine/blob/e607ba4d978c08a26e8e8e629dec0884bb161770/Engine/Source/Editor/DetailCustomizations/Private/DetailCustomizations.cpp](https://github.com/EpicGames/UnrealEngine/blob/e607ba4d978c08a26e8e8e629dec0884bb161770/Engine/Source/Editor/DetailCustomizations/Private/DetailCustomizations.cpp)

The key here is IDetailsCusmization [IDetailCustomization | Unreal Engine Documentation](https://docs.unrealengine.com/latest/INT/API/Editor/PropertyEditor/IDetailCustomization/index.html)
