# Get Type of Widget?

**URL:** <https://forums.unrealengine.com/t/get-type-of-widget/410201>\
**Category:** UI\
**Tags:** type, unreal-engine, Widget, question\
**Created:** [November 21, 2017, 11:38am UTC](https://forums.unrealengine.com/t/get-type-of-widget/410201 "2017-11-21T11:38:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_100f129d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_100f129d](https://forums.unrealengine.com/u/anonymous_user_100f129d)\
**Post date:** [November 21, 2017, 11:38am UTC](https://forums.unrealengine.com/t/get-type-of-widget/410201/1 "2017-11-21T11:38:38Z")

</div>

how can i get the type of a widget? when iterating through a list of widgets, i need to know if its a button, textblock etc.

all my widgets have a type prefix in their name, so i could use GetDisplayName. but i wonder if there is a better way, that doesnt rely on the name.

---

<div class="post-metadata">

**Author:** ![Unzkilled](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Unzkilled](https://forums.unrealengine.com/u/Unzkilled)\
**Post date:** [November 21, 2017, 11:41am UTC](https://forums.unrealengine.com/t/get-type-of-widget/410201/2 "2017-11-21T11:41:40Z")

</div>

You can use Get class and then get display name of that class. It will return the same name across widgets which share the same class type.

 ![220955-sem-titulo.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/d/0/bd0369476b93b77c1b0d62aae50128ed49c11df4.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_100f129d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_100f129d](https://forums.unrealengine.com/u/anonymous_user_100f129d)\
**Post date:** [November 21, 2017, 11:58am UTC](https://forums.unrealengine.com/t/get-type-of-widget/410201/3 "2017-11-21T11:58:30Z")

</div>

cool. thanks.

---

<div class="post-metadata">

**Author:** ![NineMeasure](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ninemeasure/32/936519_2.png) [@NineMeasure](https://forums.unrealengine.com/u/NineMeasure)\
**Post date:** [May 12, 2024, 10:26pm UTC](https://forums.unrealengine.com/t/get-type-of-widget/410201/4 "2024-05-12T22:26:05Z")

</div>

Thanks a lot !!!
