# SComboButton clickable

**URL:** <https://forums.unrealengine.com/t/scombobutton-clickable/474952>\
**Category:** UI\
**Tags:** unreal-engine, slate, UE4, CPP, question\
**Created:** [November 24, 2020, 2:44pm UTC](https://forums.unrealengine.com/t/scombobutton-clickable/474952 "2020-11-24T14:44:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gurulis99](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gurulis99](https://forums.unrealengine.com/u/Gurulis99)\
**Post date:** [November 24, 2020, 2:44pm UTC](https://forums.unrealengine.com/t/scombobutton-clickable/474952/1 "2020-11-24T14:44:08Z")

</div>

Hello, i have create a combo button for the UE4 Editor in a different tab window.

```
+ SHorizontalBox::Slot()
                    .AutoWidth()
                    .VAlign(VAlign_Center)
                    .Padding(1,1,3,1)
                    [
                        SNew(SComboButton)
                        .VAlign(VAlign_Center)
                        .HAlign(HAlign_Left)    
                        .HasDownArrow(true)
                        .ButtonContent()
                        [
                                SNew(STextBlock)
                                .Text(FText::FromString(TEXT("Tests")))
                        ]
                        .MenuContent()
                        [
                            SNew(SVerticalBox)
                            + SVerticalBox::Slot()
                            .AutoHeight()
                            [
                                SNew(STextBlock)
                                .Text(FText::FromString(TEXT("Test 1")))
                            ]
                            + SVerticalBox::Slot()
                            .AutoHeight()
                            [
                                SNew(STextBlock)
                                .Text(FText::FromString(TEXT("Test 2")))
                            ]
                        ]

```

This is the code in the ChildSlot of the Tab window. I cant figure out what I need to put in order the Test1 and Test2 texts to be clickable… Any ideas?? Also, is there any good guide for the slate components??? Because i havent find anything good to be honest…

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![LogierJan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/logierjan/32/88718_2.png) [@LogierJan](https://forums.unrealengine.com/u/LogierJan)\
**Post date:** [November 25, 2020, 2:49pm UTC](https://forums.unrealengine.com/t/scombobutton-clickable/474952/2 "2020-11-25T14:49:47Z")

</div>

If you want to see how different slate components are made you can check out the **WidgetGallery**.

you can visualize it by going to _Window → Developer Tools → Debug Tools → Test Suite_

Then select the _Widget Gallery_ Tab.

* * *

The code for these slate examples can be found here:

C:\Program Files\Epic Games\UE\_4.25\Engine\Source\Runtime\AppFramework\Private\Framework\Testing\SWidgetGallery._(h/cpp)_

---

<div class="post-metadata">

**Author:** ![Gurulis99](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gurulis99](https://forums.unrealengine.com/u/Gurulis99)\
**Post date:** [November 26, 2020, 12:09pm UTC](https://forums.unrealengine.com/t/scombobutton-clickable/474952/3 "2020-11-26T12:09:16Z")

</div>

this didn’t helped at all. Ok, i can see the .cpp and .h of SButton, SCheckBox etc, but not the .cpp of the implementation…

---

<div class="post-metadata">

**Author:** ![LogierJan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/logierjan/32/88718_2.png) [@LogierJan](https://forums.unrealengine.com/u/LogierJan)\
**Post date:** [November 26, 2020, 12:23pm UTC](https://forums.unrealengine.com/t/scombobutton-clickable/474952/4 "2020-11-26T12:23:44Z")

</div>

I’m not sure what you mean, if you look at line 345 in the cpp of _SWidgetGallery_ you will find the implementation of the _SComboButton_, where you will see that you will need to add an _SButton_ if you want to make your Test 1 and Test 2 clickable.

---

<div class="post-metadata">

**Author:** ![Gurulis99](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gurulis99](https://forums.unrealengine.com/u/Gurulis99)\
**Post date:** [November 26, 2020, 12:57pm UTC](https://forums.unrealengine.com/t/scombobutton-clickable/474952/5 "2020-11-26T12:57:34Z")

</div>

Its the same thing, but for one reason mine is not clickable.

---

<div class="post-metadata">

**Author:** ![LogierJan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/logierjan/32/88718_2.png) [@LogierJan](https://forums.unrealengine.com/u/LogierJan)\
**Post date:** [November 26, 2020, 1:01pm UTC](https://forums.unrealengine.com/t/scombobutton-clickable/474952/6 "2020-11-26T13:01:25Z")

</div>

Yours does not have a button in the menu content, you can see the SWidgetGallery one has a _SButton_ “Arbibratrary” in the second vertical box slot.

```
.MenuContent()
[
	SNew(SVerticalBox)

	+ SVerticalBox::Slot()
		.AutoHeight()
		[
			SNew(STextBlock)
				.Text(LOCTEXT("ComboButtonItemLabel01", "Combo\n Button\n menu\n content supports"))
		]

	+ SVerticalBox::Slot()
		.AutoHeight()
		.HAlign(HAlign_Center)
		[
			SNew(SButton)
				[ 
					SNew(STextBlock)
						.Text(LOCTEXT("ComboButtonItemLabel02", "arbitrary"))
				]
		]

	+ SVerticalBox::Slot()
		.AutoHeight()
		[
			SNew(STextBlock)
				.Text(LOCTEXT("ComboButtonItemLabel03", "widgets"))
		]
]
```
